:root {
  --primary: #108d35;
  --primary-dark: #08752b;
  --primary-soft: #e9f8ee;
  --ink: #070b1d;
  --muted: #687086;
  --line: #d7dde8;
  --surface: #ffffff;
  --panel: #f3faf5;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(16, 141, 53, 0.08), transparent 30%),
    linear-gradient(180deg, #fbfcfd 0%, #f3f5f2 100%);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1780px, 100%);
  overflow: hidden;
  border: 1px solid rgba(13, 21, 35, 0.08);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
}

.login-card {
  min-height: 930px;
  display: grid;
  grid-template-columns: 47% 53%;
  background: #fff;
}

.hero-panel {
  position: relative;
  z-index: 0;
  padding: 46px 64px 44px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 42%, rgba(16, 141, 53, 0.08) 0 23%, transparent 24%),
    linear-gradient(145deg, #f8fcf9 0%, #eef8ef 100%);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 -56px 0 0;
  z-index: -1;
  clip-path: polygon(0 0, 94% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 24% 78%, rgba(16, 141, 53, 0.08), transparent 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(232, 245, 236, 0.94));
}

.hero-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: -30px;
  bottom: -100px;
  height: 360px;
  z-index: -1;
  background: radial-gradient(ellipse at 42% 0%, rgba(16, 141, 53, 0.11), transparent 67%);
}

.brand-bar {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.logo-box {
  width: 48px;
  height: 58px;
  display: grid;
  place-items: center;
}

.logo-box img {
  width: 46px;
  height: auto;
}

.brand-label {
  font-size: 1.95rem;
  line-height: 1;
  font-weight: 800;
}

.brand-main {
  color: #050915;
}

.brand-highlight {
  color: var(--primary);
}

.hero-copy {
  width: min(510px, 100%);
  margin-top: 64px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 2.55vw, 2.85rem);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy h1 span {
  display: block;
  color: var(--primary);
}

.hero-text {
  width: min(385px, 100%);
  margin-top: 20px;
  color: #1c2637;
  font-size: 1.08rem;
  line-height: 1.75;
}

.download-apps {
  position: relative;
  margin-top: 22px;
  display: grid;
  place-items: center;
}

.download-apps::before,
.download-apps::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 34px;
  border-radius: 100% 0 100% 0;
  background: #72b943;
  box-shadow: 0 8px 18px rgba(16, 141, 53, 0.2);
  animation: floatLeaf 4s ease-in-out infinite;
}

.download-apps::before {
  left: 60px;
  top: 160px;
  transform: rotate(-24deg);
}

.download-apps::after {
  right: 58px;
  top: 102px;
  transform: rotate(58deg);
  animation-delay: -1.4s;
}

.store-visual {
  width: min(690px, 100%);
  filter: drop-shadow(0 24px 34px rgba(35, 78, 42, 0.22));
}

.hero-features {
  width: min(650px, 90%);
  min-height: 132px;
  margin: auto auto 0;
  padding: 18px 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 18px 48px rgba(47, 83, 56, 0.09);
}

.hero-features article {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.hero-features article img {
  width: 54px;
  height: 54px;
  padding: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(16, 141, 53, 0.1);
}

.hero-features strong {
  max-width: 104px;
  color: #050915;
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 600;
}

.form-panel {
  padding: 42px 82px 42px 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header {
  width: min(665px, 100%);
  margin: 0 auto 34px;
  display: flex;
  flex-direction: column;
}

.top-link {
  align-self: flex-end;
  margin-bottom: 78px;
  color: #394154;
  font-size: 0.98rem;
  font-weight: 500;
}

.top-link strong {
  color: var(--primary);
  font-weight: 700;
}

.top-link:hover strong,
.link-underline:hover {
  color: #066b28;
}

.form-title {
  font-size: clamp(2rem, 2.55vw, 2.65rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.form-subtitle {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.login-form {
  width: min(665px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.input-group {
  display: grid;
  gap: 9px;
}

.input-group label,
.label-row {
  color: #050915;
  font-size: 0.94rem;
  font-weight: 600;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.link-underline {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.input-shell {
  position: relative;
  min-height: 61px;
  display: flex;
  align-items: center;
  border: 1px solid #cdd4e1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 0 0 rgba(16, 141, 53, 0);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.input-shell::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(16, 141, 53, 0.36), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.input-shell:focus-within {
  border-color: rgba(16, 141, 53, 0.68);
  box-shadow: 0 0 0 5px rgba(16, 141, 53, 0.08), 0 14px 38px rgba(16, 141, 53, 0.14);
  transform: translateY(-1px);
}

.input-shell:focus-within::after {
  opacity: 1;
  animation: inputSweep 1.7s ease infinite;
}

.field-icon {
  flex: 0 0 auto;
  margin-left: 18px;
  color: #293142;
  transition: color 0.22s ease, filter 0.22s ease;
}

.input-shell:focus-within .field-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 6px rgba(16, 141, 53, 0.3));
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 59px;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: #151d2d;
  background: transparent;
  font-size: 0.98rem;
}

.input-shell input::placeholder {
  color: #777f93;
}

.password-group .input-shell input {
  padding-right: 62px;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #343b4b;
  transform: translateY(-50%);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.eye-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 18px rgba(16, 141, 53, 0.18);
}

.eye-closed {
  display: none;
}

.row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -2px;
}

.remember {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid #cdd4e1;
  border-radius: 5px;
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.remember input:checked + .check-box {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 16px rgba(16, 141, 53, 0.2);
}

.login-button {
  position: relative;
  min-height: 56px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #11933a 0%, #087d2d 100%);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(16, 141, 53, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.login-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -34%;
  width: 28%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  opacity: 0;
}

.login-button:hover,
.login-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 5px rgba(16, 141, 53, 0.1), 0 22px 42px rgba(16, 141, 53, 0.28);
  filter: saturate(1.08);
}

.login-button:hover::before,
.login-button:focus-visible::before {
  opacity: 1;
  animation: buttonShine 1.15s ease;
}

.login-button:active {
  transform: translateY(0);
}

.social-divider {
  width: min(665px, 100%);
  margin: 44px auto 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.social-divider span:first-child,
.social-divider span:last-child {
  height: 1px;
  flex: 1;
  background: #d9deea;
}

.social-divider span:nth-child(2) {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
}

.social-login {
  width: min(665px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 31px;
}

.btn-social {
  min-width: 0;
  min-height: 56px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #d5dbe6;
  border-radius: 8px;
  color: #0c1020;
  background: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.btn-social:hover,
.btn-social:focus-visible {
  border-color: rgba(16, 141, 53, 0.5);
  box-shadow: 0 0 0 5px rgba(16, 141, 53, 0.07), 0 18px 36px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.btn-social img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.form-message {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  text-align: center;
}
.form-message.error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.form-message.success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

.secure-note {
  width: min(665px, 100%);
  margin: 50px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.secure-note img {
  width: 18px;
  height: 18px;
}

.site-footer {
  padding: 34px 48px 30px;
  border-top: 1px solid #e0e4eb;
  background: #fff;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.15fr 1.15fr 1.85fr;
  gap: 44px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
}

.footer-logo img {
  width: 44px;
  height: auto;
}

.footer-logo p {
  max-width: none;
  margin: 0;
  color: var(--primary);
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
}

.footer-logo span {
  color: #050915;
}

.footer-brand p,
.footer-brand span,
.footer-column a,
.footer-column p,
.social-row {
  color: #5f687b;
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer-brand p {
  max-width: 315px;
}

.footer-column h3 {
  margin-bottom: 14px;
  color: #050915;
  font-size: 0.98rem;
  font-weight: 800;
}

.footer-column a {
  display: block;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--primary);
}

.download-column {
  padding-left: 40px;
  border-left: 1px solid #d7dce5;
}

.footer-badges {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-badges img {
  height: 44px;
  width: auto;
  border-radius: 7px;
}

.social-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.social-row a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf0f5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-row a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.social-row img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

/* ── UX: Field validation states ── */
.input-shell.is-valid {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}
.input-shell.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  animation: shake 0.4s ease;
}

/* ── UX: Shake animation ── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.shake {
  animation: shake 0.4s ease;
}

/* ── UX: Auto-dismiss fade-out ── */
.form-message.fade-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ── UX: Loading Skeletons ── */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; margin-left: 0; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 60%; }
.skeleton-card { height: 180px; border-radius: 16px; }
.skeleton-stat { height: 90px; border-radius: 12px; margin-bottom: 12px; }

/* ── UX: Success checkmark pulse ── */
@keyframes checkPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.check-pulse { animation: checkPulse 0.5s ease; }

/* ── UX: Disabled button state ── */
.login-button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  filter: saturate(0.7);
}

/* ── UX: Field hint text ── */
.field-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
  transition: color 0.2s ease;
}
.field-hint.error {
  color: #ef4444;
}
.field-hint.success {
  color: #16a34a;
}

@keyframes floatLeaf {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -16px;
  }
}

@keyframes buttonShine {
  from {
    left: -34%;
  }
  to {
    left: 112%;
  }
}

@keyframes inputSweep {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(12deg);
  }
}

@media (max-width: 1200px) {
  body {
    padding: 12px;
  }

  .login-card {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 40px 36px 48px;
  }

  .hero-panel::before {
    clip-path: none;
    inset: 0;
  }

  .hero-copy {
    margin-top: 42px;
  }

  .form-panel {
    padding: 44px 36px 58px;
  }

  .top-link {
    margin-bottom: 44px;
  }

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

  .download-column {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  body {
    padding: 0;
    align-items: stretch;
  }

  .page-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .hero-panel {
    padding: 30px 22px 34px;
  }

  .brand-label {
    font-size: 1.55rem;
  }

  .logo-box {
    width: 42px;
    height: 46px;
  }

  .hero-copy {
    margin-top: 34px;
  }

  .hero-copy h1 {
    font-size: 1.6rem;
  }

  .download-apps {
    margin-top: 18px;
    display: none;
  }

  .hero-features {
    width: 100%;
    min-height: auto;
    padding: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-features article img {
    width: 44px;
    height: 44px;
    padding: 11px;
  }

  .hero-features strong {
    font-size: 0.72rem;
  }

  .form-panel {
    padding: 34px 20px 46px;
  }

  .top-link {
    align-self: flex-start;
    margin-bottom: 34px;
    font-size: 0.85rem;
  }

  .form-title {
    font-size: 1.6rem;
  }

  .login-form {
    gap: 24px;
  }

  .label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .input-shell {
    min-height: 52px;
  }

  .input-shell input {
    height: 50px;
    font-size: 0.9rem;
  }

  .social-login,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .social-login {
    gap: 12px;
  }

  .btn-social {
    min-height: 48px;
    font-size: 0.9rem;
  }

  .site-footer {
    padding: 30px 22px;
  }

  .secure-note {
    margin-top: 28px;
  }

  .login-button {
    min-height: 50px;
  }
}

/* ── Toast Notification (Warungio Style) ── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: calc(100% - 48px);
}

.toast-notification-custom {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #ffffff;
  border-left: 5px solid #108d35;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.toast-notification-custom.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification-custom.hide {
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-custom-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #e9f8ee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #108d35;
}

.toast-custom-icon svg {
  width: 14px;
  height: 14px;
}

.toast-custom-content {
  flex-grow: 1;
}

.toast-custom-title {
  font-weight: 700;
  font-size: 1rem;
  color: #070b1d;
  margin-bottom: 4px;
}

.toast-custom-message {
  font-size: 0.85rem;
  color: #687086;
  line-height: 1.5;
}
