/* WPOS sign-in (login.php): showcase carousel + passwordless form. */
@font-face { font-family: "D-DIN"; src: url("../fonts/d-din-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "D-DIN"; src: url("../fonts/d-din-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "D-DIN Condensed"; src: url("../fonts/d-din-condensed-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #231F20;
  --ink-2: #2E2829;
  --ink-3: #4A4345;
  --mute: #A9A09A;
  --paper: #FBF6EA;
  --cream: #F3EAD3;
  --line: #E4DACB;
  --stone: #6B635C;
  --yellow: #FFCE00;
  --red: #E21B16;
  --green: #1F7A4D;
  --white: #FFFFFF;
  --slide: 6s;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.wl-body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--ink);
  font-family: "D-DIN", "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.wl-shell { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.wl-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--ink-3);
  border-radius: 24px;
  background: var(--paper);
}

/* ---------- Showcase (left) ---------- */
.wl-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 28px 32px 28px;
  color: var(--cream);
  background: var(--ink-2);
  overflow: hidden;
}
.wl-showcase-head { display: grid; gap: 8px; }
.wl-showcase-brand { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; width: fit-content; color: inherit; text-decoration: none; }
.wl-showcase-brand img { display: block; height: 28px; width: auto; }
.wl-brand-tag { padding-left: 14px; border-left: 1px solid rgba(243, 234, 211, .28); color: var(--cream); font-size: 15px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; }
.wl-brand-slogan { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.35; }

.wl-stage { position: relative; flex: 1 1 auto; min-height: 190px; }
/* Each scene is scaled down by the script when the stage is shorter than the scene. */
.wl-scene > * { zoom: var(--fit, 1); }
.wl-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  pointer-events: none;
}
.wl-scene.is-active { opacity: 1; transform: none; }

/* Items inside the active scene appear one by one (--i sets the order). */
.wl-scene [style*="--i"] { opacity: 0; transform: translateY(10px); }
.wl-scene.is-active [style*="--i"] { animation: wl-rise .55s var(--ease) forwards; animation-delay: calc(var(--i) * .35s + .2s); }
@keyframes wl-rise { to { opacity: 1; transform: none; } }

/* 1. Kasir receipt */
.wl-receipt {
  position: relative;
  width: min(330px, 92%);
  padding: 22px 20px 26px;
  color: var(--ink);
  background: var(--white);
  border-radius: 6px 6px 0 0;
  font-family: "Courier New", monospace;
  font-size: 13px;
  /* Torn ticket edge, Tiket Dapur motif. */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
}
.wl-receipt-head { display: grid; gap: 2px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px dashed var(--ink); text-align: center; }
.wl-receipt-head b { font-size: 15px; letter-spacing: .08em; }
.wl-receipt-head span { color: var(--stone); font-size: 11px; }
.wl-receipt-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; }
.wl-receipt-line small { display: block; color: var(--stone); font-size: 11px; }
.wl-receipt-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--ink); font-size: 16px; font-weight: 700; }
.wl-receipt-stamp {
  position: absolute;
  left: 50%;
  bottom: 22px;
  margin-left: -44px;
  padding: 4px 12px;
  border: 2px solid var(--green);
  border-radius: 6px;
  color: var(--green);
  font-family: "D-DIN Condensed", sans-serif;
  font-size: 20px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wl-scene.is-active .wl-receipt-stamp { animation-name: wl-stamp; }
@keyframes wl-stamp { 0% { opacity: 0; transform: scale(1.8); } 60% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }

.wl-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 700;
  font-size: 14px;
}
.wl-chip-float { position: absolute; left: 4%; top: 12%; }

/* 2. QR Meja */
.wl-scene-qr { grid-template-columns: auto auto; gap: 28px; align-content: center; justify-content: center; }
.wl-phone {
  position: relative;
  width: 214px;
  padding: 30px 14px 16px;
  border: 6px solid var(--ink);
  border-radius: 30px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--ink-3);
}
.wl-phone-notch { position: absolute; top: 8px; left: 50%; width: 60px; height: 8px; margin-left: -30px; border-radius: 99px; background: var(--ink); }
.wl-phone-head { display: grid; margin-bottom: 10px; }
.wl-phone-head b { font-family: "D-DIN Condensed", sans-serif; font-size: 22px; text-transform: uppercase; }
.wl-phone-head span { color: var(--stone); font-size: 12px; }
.wl-phone-item { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 13px; }
.wl-phone-item small { display: block; color: var(--stone); font-size: 11px; }
.wl-phone-item b { margin-left: auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--yellow); }
.wl-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--cream); background: var(--ink); font-weight: 700; font-size: 13px; }
.wl-phone-cta { margin-top: 10px; padding: 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow); font-weight: 700; font-size: 13px; text-align: center; }
.wl-qr {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 14px);
  gap: 3px;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
}
.wl-qr i { width: 14px; height: 14px; border-radius: 2px; background: var(--cream); }
.wl-qr i.on { background: var(--ink); }
.wl-qr-scan { position: absolute; left: 8px; right: 8px; top: 12px; height: 3px; border-radius: 2px; background: var(--red); opacity: 0; }
.wl-scene-qr.is-active .wl-qr-scan { animation: wl-scan 1.6s ease-in-out .2s 2 forwards; }
@keyframes wl-scan { 0% { opacity: 1; transform: translateY(0); } 50% { opacity: 1; transform: translateY(116px); } 100% { opacity: 0; transform: translateY(0); } }
.wl-toast {
  position: absolute;
  right: 4%;
  bottom: 8%;
  display: grid;
  padding: 10px 14px;
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
  color: var(--cream);
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink-3);
  font-size: 13px;
}
.wl-toast span { color: var(--mute); font-size: 12px; }

/* 3. Layar Dapur */
.wl-board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(460px, 100%); }
.wl-col { display: grid; align-content: start; gap: 8px; min-height: 230px; padding: 10px; border: 1px dashed var(--ink-3); border-radius: 12px; }
.wl-col > span { color: var(--mute); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wl-ticket { height: 64px; border-radius: 8px; background: var(--ink-3); }
.wl-ticket-ghost { opacity: .6; }
.wl-ticket-move {
  position: absolute;
  top: 36px;
  left: 10px;
  display: grid;
  gap: 1px;
  width: calc((100% - 20px) / 3 - 20px);
  height: auto;
  padding: 10px;
  color: var(--ink);
  background: var(--paper);
  border-top: 4px solid var(--yellow);
  font-size: 12px;
}
.wl-ticket-move b { font-size: 12px; }
.wl-ticket-move small { color: var(--stone); font-size: 11px; }
.wl-scene-dapur.is-active .wl-ticket-move { animation: wl-board 5.4s var(--ease) forwards; }
@keyframes wl-board {
  0%, 18% { transform: translateX(0); border-top-color: var(--yellow); }
  40%, 58% { transform: translateX(calc(100% + 30px)); border-top-color: #F28C28; }
  80%, 100% { transform: translateX(calc(200% + 60px)); border-top-color: var(--green); }
}

/* 4. Laporan */
.wl-report { width: min(420px, 100%); padding: 22px; border-radius: 16px; color: var(--ink); background: var(--paper); }
.wl-report-head { display: grid; gap: 2px; }
.wl-report-head span { color: var(--stone); font-size: 13px; }
.wl-report-head b { font-family: "D-DIN Condensed", sans-serif; font-size: 40px; line-height: 1; }
.wl-report-head small { color: var(--green); font-weight: 700; font-size: 13px; }
.wl-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; margin: 18px 0 10px; }
.wl-bars span { position: relative; height: var(--h); border-radius: 6px 6px 2px 2px; background: var(--ink); transform-origin: bottom; }
.wl-bars span:last-child { background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }
.wl-bars i { position: absolute; bottom: -20px; left: 0; right: 0; color: var(--stone); font-size: 11px; font-style: normal; text-align: center; }
.wl-scene-laporan [style*="--i"] { opacity: 1; transform: scaleY(0); }
.wl-scene-laporan.is-active .wl-bars span { animation: wl-grow .7s var(--ease) forwards; animation-delay: calc(var(--i) * .12s + .2s); }
@keyframes wl-grow { to { transform: scaleY(1); } }
.wl-report-top { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; }
.wl-report-top span { color: var(--stone); }

/* Caption + progress tabs */
.wl-caption { display: grid; gap: 6px; max-width: 460px; }
.wl-caption-tag { justify-self: start; padding: 3px 10px; border-radius: 999px; color: var(--ink); background: var(--yellow); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.wl-caption h2 { margin: 0; color: var(--white); font-family: "D-DIN Condensed", sans-serif; font-size: clamp(30px, 3.4vw, 44px); line-height: .98; letter-spacing: .01em; text-transform: uppercase; }
.wl-caption p { margin: 0; color: var(--mute); font-size: 15px; }
.wl-caption.is-changing h2, .wl-caption.is-changing p, .wl-caption.is-changing .wl-caption-tag { animation: wl-rise .5s var(--ease); }

.wl-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wl-tab { display: grid; gap: 8px; padding: 0; border: 0; color: var(--mute); background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.wl-tab:hover, .wl-tab.is-active { color: var(--white); }
.wl-tab:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 4px; }
.wl-tab-bar { position: relative; display: block; height: 3px; overflow: hidden; border-radius: 3px; background: var(--ink-3); }
.wl-tab-bar i { position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: left; }
.wl-tab.is-done .wl-tab-bar i { transform: scaleX(1); }
.wl-tab.is-active .wl-tab-bar i { animation: wl-progress var(--slide) linear forwards; }
.wl-showcase.is-paused .wl-tab.is-active .wl-tab-bar i { animation-play-state: paused; }
@keyframes wl-progress { to { transform: scaleX(1); } }

/* ---------- Form panel (right) ---------- */
.wl-panel { display: grid; place-items: center; min-width: 0; padding: 40px 32px; background: var(--paper); }
.wl-panel-inner { display: grid; gap: 18px; width: min(400px, 100%); }
.wl-panel-logo { display: none; }
.wl-step { display: grid; gap: 14px; }
.wl-step[hidden] { display: none; }
.wl-step.is-active { animation: wl-rise .45s var(--ease); }
.wl-step h1 { margin: 6px 0 0; font-family: "D-DIN Condensed", sans-serif; font-size: 40px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.wl-lead { margin: 0; color: var(--stone); font-size: 15px; }
.wl-lead b { color: var(--ink); word-break: break-all; }

.wl-alert { padding: 10px 14px; border: 1.5px solid var(--red); border-radius: 10px; color: var(--ink); background: var(--white); font-size: 14px; }
.wl-alert[hidden] { display: none; }
.wl-alert.is-info { border-color: var(--ink); background: var(--cream); }

.wl-google { display: flex; justify-content: center; min-height: 44px; }
.wl-divider { display: flex; align-items: center; gap: 12px; color: var(--stone); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.wl-divider::before, .wl-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.wl-form { display: grid; gap: 12px; }
.wl-label { font-size: 13px; font-weight: 700; }
.wl-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 16px;
}
.wl-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow); }

.wl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wl-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wl-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.wl-button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.wl-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wl-button:disabled { color: var(--stone); background: var(--cream); border-color: var(--line); box-shadow: none; transform: none; cursor: not-allowed; }
.wl-button.is-loading span::after { content: "…"; }
.wl-button-ghost { background: var(--white); box-shadow: none; }

.wl-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.wl-otp-box {
  width: 100%;
  height: 60px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  font-family: "D-DIN Condensed", sans-serif;
  font-size: 30px;
  text-align: center;
}
.wl-otp-box:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow); }
.wl-otp.is-error .wl-otp-box { border-color: var(--red); animation: wl-shake .35s; }
@keyframes wl-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.wl-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.wl-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.wl-agree { align-items: flex-start; padding: 10px 12px; border: 1.5px solid transparent; border-radius: 10px; color: var(--stone); font-size: 13px; line-height: 1.45; }
.wl-agree input { flex: 0 0 18px; margin: 1px 0 0; }
.wl-agree a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.wl-agree.is-error { border-color: var(--red); background: var(--white); }
.wl-google-wrap { position: relative; }
.wl-google-wrap.is-locked .wl-google { opacity: .45; }
.wl-google-wrap.is-locked::after { content: ""; position: absolute; inset: 0; cursor: not-allowed; }

.wl-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--stone); background: none; font: inherit; font-size: 14px; cursor: pointer; }
.wl-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wl-back:hover { color: var(--ink); }

.wl-accounts { display: grid; gap: 10px; }
.wl-account {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wl-account:hover, .wl-account:focus-visible { border-color: var(--ink); outline: none; box-shadow: 3px 3px 0 var(--ink); }
.wl-account-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--ink); background: var(--yellow); font-family: "D-DIN Condensed", sans-serif; font-size: 22px; }
.wl-account b { display: block; font-size: 16px; }
.wl-account small { color: var(--stone); font-size: 13px; }
.wl-account svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.wl-fine { margin: 0; color: var(--stone); font-size: 13px; }
.wl-fine a, .wl-link, .wl-legal a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.wl-link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.wl-link:disabled { color: var(--stone); text-decoration: none; cursor: default; }
.wl-legal { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--stone); font-size: 12px; }

/* ---------- Sign-in loader: the logo fills with water ---------- */
.wl-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  background: var(--ink);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.wl-loader[hidden] { display: none; }
.wl-loader.is-on { opacity: 1; }
.wl-loader-logo { --lw: 260px; --lh: calc(var(--lw) / 3.3236); position: relative; width: var(--lw); height: var(--lh); }
@media (max-width: 420px) { .wl-loader-logo { --lw: 200px; } }
.wl-loader-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.wl-loader-empty { opacity: .16; filter: grayscale(1); }
/* A wave-topped mask rises from below the logo to above it while drifting sideways. */
.wl-loader-fill {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 300' preserveAspectRatio='none'%3E%3Cpath d='M0 12 Q32.5 0 65 12 T130 12 V300 H0 Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 300' preserveAspectRatio='none'%3E%3Cpath d='M0 12 Q32.5 0 65 12 T130 12 V300 H0 Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: 50% 300%;
  mask-size: 50% 300%;
  -webkit-mask-position: 0 var(--lh);
  mask-position: 0 var(--lh);
}
.wl-loader.is-on .wl-loader-fill { animation: wl-fill 1.3s cubic-bezier(.45, .05, .35, 1) forwards; }
@keyframes wl-fill {
  0% { -webkit-mask-position: 0 var(--lh); mask-position: 0 var(--lh); }
  100% { -webkit-mask-position: calc(var(--lw) * -1) calc(var(--lh) * -0.2); mask-position: calc(var(--lw) * -1) calc(var(--lh) * -0.2); }
}
.wl-loader-text { margin: 0; color: var(--cream); font-size: 15px; letter-spacing: .04em; }
.wl-loader-text span { display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; white-space: nowrap; animation: wl-dots 1.2s steps(4, end) infinite; }
@keyframes wl-dots { to { width: 1.2em; } }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .wl-shell { padding: 0; place-items: stretch; }
  .wl-frame { grid-template-columns: 1fr; min-height: 100vh; border: 0; border-radius: 0; }
  .wl-showcase { gap: 12px; padding: 18px 16px 16px; }
  .wl-stage { min-height: 230px; }
  .wl-scene { transform-origin: center; }
  .wl-caption h2 { font-size: 28px; }
  .wl-caption p { display: none; }
  .wl-tab-label { display: none; }
  .wl-tab { padding: 14px 0; }
  .wl-showcase-head { gap: 6px; }
  .wl-showcase-brand img { height: 24px; }
  .wl-brand-tag { padding-left: 12px; font-size: 13px; }
  .wl-brand-slogan { font-size: 13px; }
  .wl-panel { place-items: start center; padding: 28px 16px 40px; }
  .wl-step h1 { font-size: 34px; }
}

@media (max-width: 420px) {
  .wl-otp { gap: 6px; }
  .wl-otp-box { height: 54px; font-size: 26px; }
  .wl-scene-qr .wl-qr { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-loader-fill { -webkit-mask-image: none; mask-image: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
