/* =====================================================================
   Staff pages: sign in, change PIN, setup
   ===================================================================== */
.auth-page { min-height: 100vh; }
.auth-shell { display: grid; grid-template-columns: minmax(340px, 44%) 1fr; min-height: 100vh; }

/* Brand panel */
.auth-brand {
  position: relative; overflow: hidden; color: #f6efe2;
  background:
    radial-gradient(90% 70% at 85% 100%, color-mix(in srgb, var(--saffron-500) 38%, transparent), transparent 60%),
    radial-gradient(80% 60% at 0% 0%, var(--jade-500), transparent 70%),
    linear-gradient(160deg, var(--jade-700), var(--jade-900));
  display: flex; align-items: center; justify-content: center; padding: 48px;
}
.auth-brand-inner { position: relative; z-index: 2; max-width: 380px; }
.auth-logo { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); margin-block-end: 28px; }
.auth-brand h1 { font-size: 40px; font-weight: 800; letter-spacing: .06em; margin-block-end: 6px; }
.auth-brand p { font-size: 17px; opacity: .85; margin: 0 0 32px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.auth-points li::before {
  content: ""; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23efbd52' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.auth-pattern {
  position: absolute; inset: 0; z-index: 1; opacity: .08;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 22px 22px;
}

/* Card */
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: 28px;
}
.auth-card-head { display: flex; align-items: center; gap: 14px; margin-block-end: 18px; }
.auth-card-head h2 { font-size: 22px; font-weight: 800; margin: 0; }
.auth-card-head p { margin: 2px 0 0; }
.auth-card-head .theme-btn { margin-inline-start: auto; }
.auth-logo-sm { width: 48px; height: 48px; border-radius: 50%; display: none; }
.auth-simple .auth-logo-sm { display: block; }
.auth-simple .auth-main { min-height: 100vh; }
.auth-foot { margin-block-start: 18px; }

.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-block-end: 18px; }
.who-btn {
  display: flex; align-items: center; gap: 10px; text-align: start;
  padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--bg-elev);
  transition: border-color .15s, background .15s;
}
.who-btn[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); }
.who-avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 800;
}
.who-avatar.is-admin { background: var(--accent-soft); color: var(--saffron-600); }
.who-btn[aria-checked="true"] .who-avatar { background: var(--primary); color: var(--primary-ink); }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text small { font-size: 12px; color: var(--text-2); font-weight: 600; }

.pin-area { text-align: center; }
.pin-label { font-weight: 700; color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 4px 0 12px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; height: 18px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); transition: background .15s, border-color .15s, transform .15s; }
.pin-dots span.on { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 22px; margin: 12px 0 6px; font-size: 14px; font-weight: 600; color: var(--danger); }
.pin-msg.ok { color: var(--ok); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block-end: 18px; }
.keypad button {
  height: 62px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 24px; font-weight: 700; color: var(--text);
  transition: background .12s, transform .08s;
}
.keypad button:hover { background: var(--primary-soft); }
.keypad button:active { transform: scale(.96); background: color-mix(in srgb, var(--primary) 18%, var(--bg-soft)); }
.keypad .kp-muted { font-size: 14px; color: var(--text-2); background: transparent; }
.keypad .kp-muted svg { width: 24px; height: 24px; }
.btn-xl { min-height: 56px; font-size: 16px; border-radius: 18px; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-logo-sm { display: block; }
}

/* Setup page */
.setup-page { padding: 32px 16px; }
.setup-card { max-width: 620px; margin: 0 auto; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; }
.setup-head { display: flex; align-items: center; gap: 16px; margin-block-end: 20px; }
.setup-head h1 { font-size: 22px; margin: 0; }
.setup-head p { margin: 2px 0 0; }
.setup-logo { width: 64px; height: 64px; border-radius: 50%; }
.setup-card h2 { font-size: 16px; margin-block: 22px 8px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.setup-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-block: 18px; }
.kv { border-collapse: collapse; }
.kv th { text-align: start; padding: 6px 18px 6px 0; color: var(--text-2); font-weight: 600; }
.kv code { font-size: 18px; font-weight: 700; }

/* Temporary POS landing (Stage 3 replaces it) */
.pos-temp { max-width: 640px; margin: 60px auto; padding: 0 16px; }
.pos-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: var(--bg-elev); border-block-end: 1px solid var(--line); }
.pos-top img { width: 40px; height: 40px; border-radius: 50%; }
.pos-top .who-name { margin-inline-start: auto; font-weight: 600; font-size: 14px; color: var(--text-2); }
