/* Author: Hariyo */
/* Architect: Himself */
/* ==========================================================
   ANDIKA ENERGINDO IAM — FULL HERO BACKGROUND WITH GLASSMORPHISM AUTH CARD
   ========================================================== */

:root {
  color-scheme: light;
  --color-brand-navy: #12365b;
  --color-brand-blue: #0867c9;
  --color-brand-blue-hover: #0759ad;
  --color-brand-yellow: #ffbf18;
  --color-text: #172b43;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-surface: #ffffff;
  --color-danger: #b42318;
  --color-focus: #0867c9;
  --shadow-card: 0 28px 64px -14px rgba(8, 18, 34, 0.48), 0 4px 16px rgba(15, 23, 42, 0.14);
  --radius-card: 20px;
  --radius-control: 10px;
  --font-sans: Inter, "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* FULL-SCREEN BACKGROUND HERO (ZERO-SCROLL VIEWPORT LOCK) */
body.iam-page {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #0b1523;
  display: flex;
  flex-direction: column;
}

/* Subtle dark gradient overlay so entire image is fully visible */
body.iam-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 28, 48, 0.42) 0%, rgba(15, 23, 42, 0.62) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Layout container without sliced white panel */
.iam-layout {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

/* Left Brand Panel: Transparent over background */
.brand-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 3.5vh, 40px) clamp(24px, 5vw, 60px);
  background: transparent;
  position: relative;
}

.brand-panel::before,
.brand-panel::after {
  display: none !important;
}

.brand-panel__visual,
.brand-panel__visual-overlay {
  display: none !important;
}

.brand-panel__footer {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.brand-panel__footer-mark {
  width: 36px;
  height: 5px;
  border-radius: 99px;
  background: var(--color-brand-yellow);
}

.brand-panel__footer-company {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-panel__footer-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Right Auth Panel: Transparent without white sliced background */
.auth-panel {
  flex: 0 0 min(520px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(12px, 2vh, 24px) clamp(20px, 4vw, 48px);
  background: transparent;
}

/* Utility navigation pinned to top-right so card stays optically centered */
.utility-nav {
  position: fixed;
  top: clamp(14px, 2.2vh, 24px);
  right: clamp(20px, 4vw, 48px);
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.utility-nav__help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.utility-nav__help:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.utility-nav__help svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}

/* Floating Glassmorphism Login Card (Sheer Frosted Crystal) */
.auth-card,
.auth-card.ae-card {
  width: 100%;
  max-width: 440px;
  padding: clamp(20px, 3vh, 30px) clamp(24px, 3vw, 34px) clamp(18px, 2.6vh, 26px);
  border-radius: var(--radius-card);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.44) 0%,
    rgba(255, 255, 255, 0.28) 100%
  );
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 1px rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.auth-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: clamp(12px, 1.8vh, 18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  text-align: center;
}

.auth-card__logo {
  height: clamp(46px, 6.4vh, 58px);
  width: auto;
  object-fit: contain;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.14));
}

.auth-card__product-name {
  margin: 0;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

.auth-card__intro {
  margin: clamp(14px, 2vh, 20px) 0 clamp(12px, 1.8vh, 18px);
  text-align: center;
}

.auth-card__intro h2 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: clamp(18px, 2.4vh, 20px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

.auth-card__intro p {
  margin: 0;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

/* Form Controls */
.login-form {
  display: flex;
  flex-direction: column;
  gap: clamp(11px, 1.6vh, 15px);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field__label {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
}

.form-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.form-field__icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #475569;
  pointer-events: none;
  z-index: 1;
}

.form-field__input {
  width: 100%;
  height: 41px;
  padding: 0 12px 0 38px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.form-field__input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.90);
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px rgba(8, 103, 201, 0.22);
}

/* Keep glassmorphism aesthetic even when browser autofills NIP/password */
.form-field__input:-webkit-autofill,
.form-field__input:-webkit-autofill:hover,
.form-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.72) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.form-field__input--password {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
}

.password-toggle:hover {
  color: #1e293b;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}

.form-field__error {
  margin: 0;
  font-size: 12px;
  color: var(--color-danger);
  display: none;
}

.form-field__error.is-visible {
  display: block;
}

/* Options */
.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.remember-option input {
  accent-color: var(--color-brand-blue);
}

.text-link {
  background: transparent;
  border: none;
  padding: 0;
  color: #0653a3;
  font-weight: 700;
  cursor: pointer;
  font-size: inherit;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.text-link:hover {
  text-decoration: underline;
}

/* Submit Button */
.button--primary.login-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  margin-top: 2px;
  border: none;
  border-radius: var(--radius-control);
  background: linear-gradient(135deg, #0867c9 0%, #0653a3 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(8, 103, 201, 0.42);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}

.button--primary.login-form__submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 24px -4px rgba(8, 103, 201, 0.52);
}

.button--primary.login-form__submit:active {
  transform: translateY(1px);
}

.button--primary.login-form__submit svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.form-status {
  margin: 4px 0 0;
  font-size: 12.5px;
  text-align: center;
}

.access-help {
  margin: clamp(12px, 1.8vh, 16px) 0 0;
  text-align: center;
  color: #1e293b;
  font-weight: 500;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

/* Single-Line Compact Footer below card */
.auth-footer {
  margin-top: clamp(10px, 1.6vh, 16px);
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-footer__links {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
}

.auth-footer__links button {
  background: transparent;
  border: none;
  padding: 0;
  color: #ffffff;
  cursor: pointer;
  font-size: inherit;
  opacity: 0.9;
}

.auth-footer__links button:hover {
  text-decoration: underline;
  opacity: 1;
}

@media (max-width: 860px) {
  .brand-panel {
    display: none;
  }
  .auth-panel {
    flex: 1;
    width: 100%;
  }
}


/* FULL-SCREEN ROTATING BACKGROUND WITH SMOOTH FADE IN-OUT */
.bg-slider {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2.8s ease-in-out;
  will-change: opacity;
}

.bg-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.bg-slider__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 28, 48, 0.42) 0%, rgba(15, 23, 42, 0.62) 100%);
  z-index: 2;
  pointer-events: none;
}


/* Sleek Corporate Glassmorphism Modal Dialog */
.notice-dialog {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  padding: 32px 28px 26px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.76) 100%
  );
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.42);
  max-width: 440px;
  width: 90%;
  margin: auto;
}

.notice-dialog::backdrop {
  background: rgba(10, 25, 45, 0.62);
  backdrop-filter: blur(8px);
}

.notice-dialog__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.notice-dialog__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(239, 246, 255, 0.9);
  color: #0867c9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.notice-dialog__title {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.notice-dialog__message {
  margin: 0 0 24px;
  color: #334155;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-line;
  text-align: center;
  word-break: break-word;
}

.notice-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #0867c9;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.notice-dialog__close:hover {
  background: #0759ad;
}

.notice-dialog__close:active {
  transform: translateY(1px);
}

/* Integrated Card Help Pill (Hallmark Pattern) */
.card-help-pill {
  position: absolute;
  top: clamp(14px, 2vh, 20px);
  right: clamp(16px, 2.5vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #0f172a;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: all 0.2s ease;
  z-index: 5;
}

.card-help-pill:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.95);
  color: #0867c9;
}

.card-help-pill svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}


.text-link:focus,
.text-link:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  text-decoration: underline;
}


/* REGISTER DIALOG STYLING */
.register-dialog {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  padding: 0;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(248, 250, 252, 0.92) 100%
  );
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.45);
  max-width: 640px;
  width: 94%;
  margin: auto;
  overflow: hidden;
}

.register-dialog::backdrop {
  background: rgba(10, 25, 45, 0.65);
  backdrop-filter: blur(8px);
}

.register-dialog__body {
  padding: 28px 32px 32px;
  max-height: 85vh;
  overflow-y: auto;
}

.register-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.register-dialog__title {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.register-dialog__subtitle {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.register-dialog__close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.register-dialog__close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.reg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 580px) {
  .reg-grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.form-field__select {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}

.reg-notice-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 18px 0 22px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: #92400e;
}

.reg-notice-box__icon {
  color: #d97706;
  flex-shrink: 0;
  margin-top: 1px;
}

.register-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}
