/* ═══════════ LIUNI TEA — หน้าแอดมิน (ธีมฟ้าเดียวกับแอป) ═══════════ */

body { background: var(--bg); }

.admin-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* ── แถบบน ── */
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 2px solid #b8d4f5;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-top-title {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 900;
  font-size: 19px;
  color: #111;
}
.admin-top-title span {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--brand);
  margin-left: 4px;
}
.admin-logout {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 14px;
}
.admin-logout:active { background: #eef3fa; }

/* ── การ์ด (login) ── */
.admin-card {
  background: #fff;
  border: 1px solid #dce5f1;
  border-radius: 16px;
  padding: 30px 24px 22px;
  margin-top: 36px;
  box-shadow: 0 2px 10px rgba(31, 111, 214, 0.08);
}
.admin-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 900;
  font-size: 28px;
  text-align: center;
  color: #111;
}
.admin-logo span { color: var(--brand); }
.admin-card h1 {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin: 10px 0 24px;
}
.admin-card .text-input + .text-input { margin-top: 16px; }
.admin-card .btn { margin-top: 20px; }
.back-link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 18px;
  text-decoration: none;
}
.back-link:hover { color: var(--brand); }

/* ── แบนเนอร์กติกา ── */
.rule-banner {
  background: var(--brand);
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(31, 111, 214, 0.25);
}

/* ── แผง (panel) ── */
.panel {
  background: #fff;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(31, 111, 214, 0.06);
}
.panel h2 {
  font-size: 16px;
  font-weight: 800;
  color: #222;
  margin-bottom: 14px;
}
.panel h2.mt { margin-top: 8px; }

/* ── กล้องสแกน ── */
#scan-video {
  width: 100%;
  border-radius: 10px;
  background: #111;
  margin-bottom: 10px;
}
#scan-canvas { display: none; }

/* ── กรอก token ── */
.token-row { display: flex; gap: 10px; align-items: flex-end; }
.token-row .text-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #a9bdd8;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fafcff;
}
.token-row .text-input:focus { border-color: var(--brand); }
.token-row .btn { width: auto; padding: 11px 18px; font-size: 14px; flex-shrink: 0; }

/* ── ข้อมูลสมาชิก ── */
.m-info {
  border: 1px dashed #b9cdea;
  border-radius: 10px;
  padding: 4px 14px;
  margin-bottom: 18px;
  background: #f7fafd;
}
.m-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef3fa;
  font-size: 14px;
  color: var(--muted);
}
.m-row:last-child { border-bottom: none; }
.m-row b { color: #222; font-weight: 700; }
.m-row b.brand { color: var(--brand); font-size: 17px; }
.m-row b.ok { color: #0a8f3c; }

/* ── ฟอร์มบันทึก ── */
#record-form .text-input { margin-top: 14px; }
#record-form .text-input:first-child { margin-top: 0; }
#record-form select.text-input {
  border: 1px solid #c6d4e8;
  border-radius: 10px;
  padding: 12px 34px 12px 12px;
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6fd6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  color: #111;
}

.earn-preview {
  text-align: center;
  font-size: 15px;
  color: #333;
  margin: 18px 0 14px;
  background: var(--brand-light);
  border-radius: 10px;
  padding: 12px;
}
.earn-preview b { color: var(--brand); font-size: 20px; font-weight: 800; }
