/**
 * Login pelanggan (index.php) — tampilan modern mobile & desktop
 */

.auth-modern--pelanggan {
  --plg-primary: #5156be;
  --plg-primary-dark: #3f44a8;
  --plg-accent: #2d9cdb;
  --plg-success: #1a7f4e;
  --plg-surface: #ffffff;
  --plg-text: #1f2937;
  --plg-muted: #6b7280;
  --plg-radius: 1.25rem;
  --plg-shadow: 0 20px 50px rgba(81, 86, 190, 0.12);
}

.auth-modern--pelanggan.auth-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(81, 86, 190, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(45, 156, 219, 0.12), transparent 55%),
    linear-gradient(180deg, #f4f6fc 0%, #eef1f8 100%);
}

.auth-modern--pelanggan .auth-modern__card {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--plg-radius);
  box-shadow: var(--plg-shadow);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  padding: clamp(1.35rem, 4vw, 2rem);
}

.auth-modern--pelanggan .auth-modern__logo {
  margin-bottom: 1rem;
}

.auth-modern--pelanggan .auth-modern__logo img {
  max-width: min(180px, 62vw);
  filter: drop-shadow(0 8px 16px rgba(81, 86, 190, 0.12));
}

.auth-modern--pelanggan .auth-modern__badge {
  background: linear-gradient(135deg, rgba(81, 86, 190, 0.14), rgba(45, 156, 219, 0.1)) !important;
  color: var(--plg-primary) !important;
  border: 1px solid rgba(81, 86, 190, 0.12);
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.auth-modern--pelanggan .auth-modern__subtitle {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.auth-plg-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Input WhatsApp */
.auth-plg-field {
  margin-bottom: 1rem;
}

.auth-plg-field__label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--plg-text);
  margin-bottom: 0.45rem;
}

.auth-plg-field__wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f8fafc;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.9rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-plg-field__wrap:focus-within {
  border-color: var(--plg-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(81, 86, 190, 0.12);
}

.auth-plg-field.has-error .auth-plg-field__wrap {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.auth-plg-field__icon {
  flex: 0 0 auto;
  width: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #25d366;
  font-size: 1.35rem;
  background: rgba(37, 211, 102, 0.08);
  align-self: stretch;
}

.auth-plg-field__input {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 52px !important;
  padding: 0 0.9rem 0 0 !important;
  font-size: 1rem !important;
  font-weight: 500;
}

.auth-plg-field__input:focus {
  outline: none;
}

.auth-plg-field__error {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: #dc2626;
}

/* Tombol masuk */
.auth-plg-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, var(--plg-primary) 0%, #6366d6 50%, var(--plg-accent) 100%) !important;
  box-shadow: 0 12px 28px rgba(81, 86, 190, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-plg-submit:hover,
.auth-plg-submit:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(81, 86, 190, 0.4);
  color: #fff !important;
}

.auth-plg-submit:active {
  transform: translateY(0);
}

/* Divider */
.auth-plg-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.35rem 0 0.25rem;
  color: var(--plg-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-plg-divider::before,
.auth-plg-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

/* Links & footer */
.auth-modern--pelanggan .auth-modern__links {
  margin-top: 1.5rem;
}

.auth-modern--pelanggan .auth-modern__links a {
  color: var(--plg-primary) !important;
  font-weight: 600;
}

.auth-modern--pelanggan .auth-modern__footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  font-size: 0.78rem;
}

/* Desktop — panel visual lebih dramatis */
@media (min-width: 992px) {
  .auth-modern--pelanggan .auth-modern__visual {
    background-image:
      linear-gradient(155deg, rgba(81, 86, 190, 0.88) 0%, rgba(45, 156, 219, 0.72) 45%, rgba(26, 127, 78, 0.65) 100%),
      url("../images/auth-bg.jpg");
  }

  .auth-modern--pelanggan .auth-modern__card {
    max-width: 440px;
  }
}

/* Mobile — layout mirip aplikasi */
@media (max-width: 991.98px) {
  body.auth-pelanggan-login .auth-modern--pelanggan.auth-page {
    background:
      radial-gradient(ellipse 90% 45% at 50% -5%, rgba(81, 86, 190, 0.22), transparent 62%),
      linear-gradient(180deg, #eef2ff 0%, #f8fafc 42%, #f1f5f9 100%);
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__main {
    padding: 0.75rem 0.75rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__card {
    border-radius: 1.5rem;
    padding: 1.35rem 1.15rem 1.15rem;
    box-shadow:
      0 4px 6px rgba(15, 23, 42, 0.04),
      0 24px 48px rgba(81, 86, 190, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.9);
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__logo img {
    max-width: min(160px, 55vw);
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__title,
  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__subtitle {
    text-align: center;
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__subtitle {
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
  }

  body.auth-pelanggan-login .auth-plg-field__wrap {
    min-height: 54px;
    border-radius: 1rem;
    border-width: 2px;
  }

  body.auth-pelanggan-login .auth-plg-field__icon {
    width: 3.25rem;
    font-size: 1.45rem;
  }

  body.auth-pelanggan-login .auth-plg-submit {
    width: 100% !important;
    min-height: 54px !important;
    margin-top: 0.25rem;
    padding: 0.85rem 1rem !important;
    border: 0 !important;
    border-radius: 1rem !important;
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #5156be 0%, #6366f1 48%, #2d9cdb 100%) !important;
    box-shadow: 0 14px 32px rgba(81, 86, 190, 0.38) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    -webkit-appearance: none;
    appearance: none;
  }

  body.auth-pelanggan-login .auth-plg-divider {
    margin: 1.5rem 0 0.75rem;
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__links {
    margin-top: 1.35rem;
  }

  body.auth-pelanggan-login .auth-modern--pelanggan .auth-modern__links p {
    margin-bottom: 0.65rem;
  }
}

/* Login di APK native — dasar layout (tema gelap di auth-pelanggan-login-apk.css) */
body.pelanggan-app.auth-pelanggan-login.auth-public .auth-modern--pelanggan.auth-page:not(.auth-modern--apk) {
  background:
    radial-gradient(ellipse 90% 45% at 50% -5%, rgba(81, 86, 190, 0.2), transparent 62%),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 50%, #f1f5f9 100%);
}

body.pelanggan-app.auth-pelanggan-login .auth-modern__main {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  min-height: auto !important;
  padding: calc(0.75rem + var(--papp-safe-top, 0px)) 0.85rem calc(1.25rem + var(--papp-safe-bottom, 0px)) !important;
}

body.pelanggan-app.auth-pelanggan-login .auth-modern__card {
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  border-radius: 1.5rem !important;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 24px 48px rgba(81, 86, 190, 0.14) !important;
  padding: 1.35rem 1.15rem 1.15rem !important;
}

body.pelanggan-app.auth-pelanggan-login .auth-plg-field__wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  min-height: 54px;
  border-radius: 1rem;
  border: 2px solid #e5e7eb;
  background: #f8fafc;
  overflow: hidden;
}

body.pelanggan-app.auth-pelanggan-login .auth-plg-field__icon {
  width: 3.25rem;
  flex: 0 0 3.25rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

body.pelanggan-app.auth-pelanggan-login .auth-plg-field__input {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
  min-height: 50px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.pelanggan-app.auth-pelanggan-login .auth-plg-submit {
  width: 100% !important;
  min-height: 54px !important;
  margin-top: 1rem !important;
  padding: 0.85rem 1rem !important;
  border: 0 !important;
  border-radius: 1rem !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #5156be 0%, #6366f1 48%, #2d9cdb 100%) !important;
  box-shadow: 0 14px 32px rgba(81, 86, 190, 0.38) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  -webkit-appearance: none;
  appearance: none;
}
