/* ==========================================================================
   FRANYX POS — design system
   "Artisan bistro" — warm cream paper, espresso ink, terracotta clay accent,
   olive secondary, gold hairlines. Fraunces (display) + Instrument Sans (body).
   Variable names kept stable so page markup/JS keep working.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4ecdd;          /* warm cream paper */
  --panel: #fbf6ec;       /* raised card surface */
  --panel-2: #efe4d1;     /* inset / subtle fill */
  --line: #e2d4ba;        /* warm hairline */
  --line-strong: #d3c0a0;
  --text: #2b2119;        /* espresso ink */
  --muted: #8a7a63;       /* taupe */
  --accent: #c05a2e;      /* terracotta / clay */
  --accent-deep: #a2481f;
  --accent-2: #9a6a1f;    /* aged gold (prices) */
  --olive: #3f5a45;       /* bistro green */
  --good: #3f5a45;
  --warn: #a9791a;
  --danger: #b23b2e;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 30px -18px rgba(43,33,25,.55);
  --shadow-lift: 0 18px 44px -22px rgba(43,33,25,.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain + warm vignette — atmosphere, not noise */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .05;
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 1; }

button, input, select { font-family: inherit; }
button { cursor: pointer; }

/* ---- typography helpers ---- */
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900; letter-spacing: -.01em;
}
.brand .x { color: var(--accent); }
.muted { color: var(--muted); }
.rp {
  font-family: "Fraunces", Georgia, serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* ---- buttons ---- */
.btn {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 15px; font-weight: 600;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary {
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  border-color: transparent; color: #fdf3e7;
  box-shadow: 0 10px 24px -12px rgba(160,72,31,.9);
}
.btn.primary:hover { box-shadow: 0 16px 34px -14px rgba(160,72,31,.95); }
.btn.good {
  background: var(--olive); color: #f2f6ee; border-color: transparent;
}
.btn:disabled { opacity: .45; box-shadow: none; cursor: default; }

/* ---- login overlay ---- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, rgba(43,33,25,.62), rgba(43,33,25,.86));
  backdrop-filter: blur(3px);
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  width: min(380px, 90vw);
  box-shadow: var(--shadow-lift);
}
.card::after {   /* gold hairline frame */
  content: ""; position: absolute; inset: 8px; border: 1px solid var(--line);
  border-radius: 10px; pointer-events: none;
}
.card h1 { margin: 0 0 2px; font-size: 30px; }
.card .brand { font-size: 30px; }
.card input {
  width: 100%; margin-top: 12px; padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #fffdf8; color: var(--text); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,90,46,.15);
}
.card .btn { width: 100%; margin-top: 16px; }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }

/* ---- QRIS fullscreen ---- */
.qris-full {
  position: fixed; inset: 0; z-index: 60;
  background: linear-gradient(180deg, #fffdf8, #f4ecdd);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.qris-full img {
  width: min(72vw, 420px); height: auto;
  border-radius: 20px; padding: 18px; background: #fff;
  box-shadow: var(--shadow-lift); border: 1px solid var(--line);
}
.qris-full .amt {
  font-family: "Fraunces", serif; color: var(--text);
  font-size: 34px; font-weight: 900;
}
.qris-full .close { position: fixed; top: 20px; right: 20px; }
