:root {
  --navy-950: #152230;
  --navy-800: #213448;
  --teal-500: #1abb9c;
  --teal-400: #33d4b4;
  --paper: #f4f7fa;
  --card: #ffffff;
  --ink: #1b2430;
  --muted: #6b7785;
  --border: #e1e8ed;
  --danger: #c0392b;

  /* pindahan dari custom.css, belum ada padanannya di atas */
  --pcr-green: #029402;
  --pcr-orange: #ff6b35;
  --pcr-success: #2e7d32;
  --pcr-radius: 8px;
  --pcr-bg: var(--paper);
  --pcr-card: var(--card);
  --pcr-text: var(--ink);
  --pcr-muted: var(--muted);
  --pcr-border: var(--border);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- Full-bleed backdrop ---------- */
.auth-shell {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(26, 187, 156, 0.18),
      transparent 45%
    ),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 100%);
}

/* signature: drifting blueprint grid, ties back to the app's own
       schedule/timeline grid language used elsewhere in the system */
.auth-shell::before {
  content: "";
  position: absolute;
  inset: -40px;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 34px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 34px
    );
  animation: gridDrift 40s linear infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell::before {
    animation: none;
  }
}

@media (max-width: 480px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .auth-card-head h2 {
    font-size: 19px;
  }
}

@keyframes gridDrift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-34px, -34px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-mark {
  display: block;
  max-width: 140px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 18px;
}

/* ---------- Login card ---------- */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 14px;
  padding: 36px 32px 30px;
  box-shadow: 0 20px 50px rgba(9, 18, 28, 0.35);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  animation: fadeUp 0.5s ease;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(9, 18, 28, 0.4);
}

.auth-card-head {
  margin-bottom: 26px;
  text-align: center;
}

.auth-card-head h2 {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 21px;
  margin: 0 0 6px;
  color: var(--ink);
}

.auth-card-head span {
  font-size: 13.5px;
  color: var(--muted);
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-input:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(26, 187, 156, 0.14);
}

.auth-input svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-left: 13px;
  color: var(--muted);
}

.auth-input input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 12px;
  font-size: 14px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  width: 100%;
}

.auth-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  padding: 0 13px;
  display: flex;
  align-items: center;
}
.auth-toggle svg {
  margin: 0;
  width: 17px;
  height: 17px;
}
.auth-toggle:hover {
  color: var(--ink);
}

.auth-submit {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 0;
  margin-top: 6px;
  background: var(--teal-500);
  color: #fff;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
}

.auth-submit:hover {
  background: #159d83;
}
.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:focus-visible,
.auth-input input:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.auth-copyright {
  margin-top: 26px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}

.auth-link {
  width: 100%;
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--teal-500);
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-back {
  margin-top: 18px;
  text-align: center;
}

.auth-back a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.auth-back a:hover {
  color: var(--ink);
}

.otp-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.otp-digit {
  width: 40px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: "Consolas", "Courier New", monospace;
  outline: none;
  transition: 0.2s;
}

.otp-digit:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(26, 187, 156, 0.15);
}
