* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #222;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.blocked-box {
  margin-top: 30vh;
  text-align: center;
  padding: 0 16px;
}

.blocked-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.blocked-text {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.blocked-subtext {
  font-size: 14px;
  color: #888;
}

.card label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.shift-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.shift-btn {
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: #1677ff;
}

.shift-btn:active {
  background: #eaf2ff;
}

.shift-buttons-loading,
.shift-buttons-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 8px 0;
}

.selected-shift-name {
  font-size: 22px;
  font-weight: 700;
  color: #1677ff;
  text-align: center;
  padding: 8px 0 4px;
}

.primary-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 17px;
  border: none;
  border-radius: 10px;
  background: #1677ff;
  color: #fff;
  margin-top: 8px;
}

.primary-btn:disabled {
  background: #b3c9e6;
}

.secondary-btn {
  width: 100%;
  padding: 12px 0;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #666;
  margin-top: 10px;
}

#scanner-wrap {
  margin-top: 16px;
}

#qr-reader {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

#result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
}

#result.success {
  background: #e8f8ee;
  color: #1a7f37;
  border: 1px solid #b6ecc8;
}

#result.failure {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c6c0;
}

.warning {
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  color: #ad6800;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  text-align: center;
}

.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.modal-card p {
  font-size: 16px;
  margin: 0 0 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .primary-btn,
.modal-actions .secondary-btn {
  margin-top: 0;
}
