/* RaksPos account pages. System fonts only: nothing loads from other sites. */
:root {
  --paper: #fbfaf6;
  --table: #1f3a32;
  --table-deep: #16302a;
  --ink: #1c2421;
  --muted: #5d6a65;
  --line: #d9ddd6;
  --accent: #1f7a55;
  --accent-ink: #ffffff;
  --error: #b3261e;
  --error-bg: #fdecea;
  --ok-bg: #e6f3ec;
  --radius: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 30% 0%, var(--table) 0%, var(--table-deep) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 64px;
}

.brand {
  color: #e9efe9;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  text-decoration: none;
}
.brand span { color: #9fd3b8; }

/* The card is a printed receipt: a paper strip with a torn, zigzag bottom edge. */
.receipt {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  padding: 32px 28px 40px;
  position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius) var(--radius) 0 0;
}
.receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 12px repeat-x,
    linear-gradient(225deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 12px repeat-x;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 6px;
}
.lead { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }

.rule {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 22px 0;
}

label { display: block; font-weight: 600; font-size: 0.95rem; margin: 16px 0 6px; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }

input {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #bfc6bf;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible { outline: 3px solid #8cc7a9; outline-offset: 1px; border-color: var(--accent); }
input.code { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

.password-row { position: relative; }
.password-row input { padding-right: 70px; }
.toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
}

.turnstile { margin: 20px 0 4px; min-height: 65px; }

button.primary,
a.primary {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
  margin-top: 18px;
  font: inherit;
  font-weight: 700;
  padding: 13px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button.primary:disabled { opacity: 0.55; cursor: not-allowed; }
button:focus-visible { outline: 3px solid #8cc7a9; outline-offset: 2px; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.message { border-radius: 8px; padding: 10px 12px; margin-top: 16px; font-size: 0.95rem; line-height: 1.4; }
.message.error { background: var(--error-bg); color: var(--error); }
.message.ok { background: var(--ok-bg); color: #1d5b40; }

.total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 4px 0;
}

.footer { color: #b9c8c0; font-size: 0.85rem; margin-top: 36px; text-align: center; }
.footer a { color: #d7e6dd; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .receipt { animation: print 420ms ease-out both; }
  @keyframes print { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
}
