/* QR受付アプリ共通スタイル（スマホファースト） */
* { box-sizing: border-box; }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  margin: 0; background: #f4f5f7; color: #1a1a2e;
  -webkit-text-size-adjust: 100%;
}
header {
  background: #1a2a52; color: #fff; padding: 10px 14px;
  font-size: 14px; font-weight: bold;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
header .device { font-size: 11px; font-weight: normal; opacity: .8; white-space: nowrap; }
main { padding: 12px; max-width: 640px; margin: 0 auto; }

/* タブ */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button {
  flex: 1; padding: 12px 4px; font-size: 14px; font-weight: bold;
  border: 1px solid #c5cbd8; border-radius: 10px; background: #fff; color: #444;
}
.tabs button.active { background: #1a2a52; color: #fff; border-color: #1a2a52; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* スキャナ */
#scanner-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
#scanner-video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
#scanner-hint { text-align: center; color: #666; font-size: 12px; margin-top: 8px; }

/* 統計バー */
.statsbar {
  display: flex; justify-content: space-around; background: #fff;
  border: 1px solid #dde1ea; border-radius: 10px; padding: 8px; margin-bottom: 12px;
  font-size: 12px; color: #555; text-align: center;
}
.statsbar b { display: block; font-size: 18px; color: #1a2a52; }

/* フォーム・リスト */
input, select, textarea {
  width: 100%; padding: 12px; font-size: 16px; border: 1px solid #c5cbd8;
  border-radius: 10px; background: #fff; margin-bottom: 10px;
}
button.primary {
  width: 100%; padding: 14px; font-size: 16px; font-weight: bold;
  background: #1a2a52; color: #fff; border: none; border-radius: 10px;
}
button.primary:disabled { opacity: .5; }
.list-item {
  background: #fff; border: 1px solid #dde1ea; border-radius: 10px;
  padding: 12px; margin-bottom: 8px; display: flex; justify-content: space-between;
  align-items: center; gap: 8px;
}
.list-item .info { min-width: 0; }
.list-item .nm { font-weight: bold; font-size: 16px; }
.list-item .sub { font-size: 12px; color: #666; margin-top: 2px; }
.list-item .done { color: #1d8348; font-size: 12px; font-weight: bold; white-space: nowrap; }
.list-item button {
  padding: 10px 14px; font-size: 14px; font-weight: bold; white-space: nowrap;
  background: #1a2a52; color: #fff; border: none; border-radius: 8px;
}
.list-item button.ghost { background: #fff; color: #1a2a52; border: 1px solid #1a2a52; }
.badge-call { background: #b7791f; color: #fff; font-size: 10px; border-radius: 6px; padding: 2px 6px; }

/* 結果オーバーレイ */
#result-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 24px; color: #fff;
}
#result-overlay.show { display: flex; }
#result-overlay.ok { background: #1d8348; }
#result-overlay.warn { background: #b7791f; }
#result-overlay.err { background: #c0392b; }
#result-overlay .big { font-size: 34px; font-weight: bold; }
#result-overlay .name { font-size: 28px; font-weight: bold; margin-top: 14px; }
#result-overlay .sub { font-size: 16px; margin-top: 6px; opacity: .95; }
#result-overlay .msg {
  background: rgba(255,255,255,.95); color: #7a4a00; font-size: 20px; font-weight: bold;
  border-radius: 12px; padding: 16px; margin-top: 18px; max-width: 480px;
}
#result-overlay .close-hint { margin-top: 26px; font-size: 14px; opacity: .9; }

/* ログイン */
#login-overlay {
  position: fixed; inset: 0; z-index: 200; background: #1a2a52;
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px;
}
#login-overlay .box { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 380px; }
#login-overlay h1 { font-size: 16px; margin: 0 0 4px; }
#login-overlay p { font-size: 12px; color: #666; margin: 0 0 14px; }
#login-error { color: #c0392b; font-size: 13px; font-weight: bold; min-height: 18px; }

/* 管理画面 */
.card { background: #fff; border: 1px solid #dde1ea; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.card h2 { font-size: 15px; margin: 0 0 10px; color: #1a2a52; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th, table.mini td { border-bottom: 1px solid #eee; padding: 6px 4px; text-align: left; }
.muted { color: #888; font-size: 12px; }
#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1a1a2e; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; display: none; z-index: 300; max-width: 90%;
}
