.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

.screen {
  padding: 18px 16px 40px;
}

.brand-head {
  padding: 34px 8px 22px;
  text-align: center;
}

.brand-head h1 {
  margin: 14px 0 4px;
  font-size: 24px;
  color: var(--ink);
}

.brand-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-panel {
  padding: 16px;
}

.shift-selector {
  margin-bottom: 4px;
}

.shift-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.current-shift {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
}

.current-shift svg {
  width: 18px;
  height: 18px;
}

.shift-hint {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 10px 0 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.remember-label input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.demo-guards {
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.demo-guards > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  padding: 0 6px;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px 22px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(14, 116, 144, 0.18);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar-name {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.topbar-sub {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  opacity: 0.94;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.topbar-actions .icon-btn {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.topbar-actions .icon-btn svg {
  width: 26px;
  height: 26px;
}

.topbar-actions .icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.content {
  padding: 14px 16px 40px;
}

.progress-panel {
  padding: 14px;
}

.progress-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.progress-label {
  font-size: 13px;
  color: var(--muted);
}

.progress-date {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.progress-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.progress-num small {
  margin-left: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.progress-bar {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: #e8eef1;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #38bdf8);
  transition: width 0.3s ease;
}

.progress-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.scan-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 22px;
}

.home-shift {
  color: var(--muted);
  font-size: 15px;
}

.home-count {
  margin-top: 6px;
  color: var(--brand);
  font-size: 17px;
  font-weight: 700;
}

.scan-big-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  min-height: 176px;
  margin: 30px auto 20px;
  padding: 18px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(14, 116, 144, 0.28);
}

.scan-big-btn svg {
  width: 58px;
  height: 58px;
}

.scan-big-btn:active {
  transform: scale(0.98);
}

.event-report-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  min-height: 176px;
  margin: 0 auto 28px;
  padding: 18px;
  border: 2px solid var(--brand);
  border-radius: 16px;
  background: #fff;
  color: var(--brand);
  font-size: 27px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(14, 116, 144, 0.12);
}

.event-report-btn svg {
  width: 58px;
  height: 58px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
}

.point-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.point-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.point-item.is-done {
  border-color: #bfe3cb;
  background: #fbfefc;
}

.point-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #edf2f4;
  color: var(--muted);
}

.point-status svg {
  width: 17px;
  height: 17px;
}

.point-item.is-done .point-status {
  background: var(--green-soft);
  color: var(--green);
}

.point-info {
  min-width: 0;
  flex: 1 1 auto;
}

.point-name {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-action {
  flex: 0 0 auto;
  text-align: right;
}

.point-time {
  display: block;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.point-extra {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.check-btn {
  min-width: 58px;
  min-height: 34px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 0 12px;
}

.point-item.is-done .check-btn {
  background: #fff;
  color: var(--green);
  border-color: #bfe3cb;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 28, 36, 0.55);
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
  border-radius: 12px 12px 0 0;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-head h3 {
  margin: 0;
  font-size: 18px;
}

.sheet-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.confirm-sheet {
  padding-bottom: 24px;
}

.confirm-point {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfc;
}

.confirm-point-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.confirm-point-icon svg {
  width: 22px;
  height: 22px;
}

.confirm-point-name {
  font-size: 17px;
  font-weight: 800;
}

.confirm-point-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.confirm-time {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.photo-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f6f8f9;
  cursor: pointer;
}

.photo-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.photo-empty svg {
  width: 32px;
  height: 32px;
}

.gps-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 2px;
  color: var(--muted);
  font-size: 13px;
}

.gps-status svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.gps-status.ok {
  color: var(--green);
}

.gps-status.fail {
  color: var(--amber);
}

.scan-sheet {
  padding-bottom: 24px;
}

.scan-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1418;
}

.scan-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35);
}

.scan-hint {
  margin: 10px 2px;
  color: var(--muted);
  font-size: 13px;
}

.scan-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.scan-actions input {
  margin-top: 0;
}

@media (min-width: 600px) {
  .screen {
    padding-top: 30px;
  }

  .overlay {
    align-items: center;
    padding: 20px;
  }

  .sheet {
    border-radius: var(--radius);
    max-height: 86vh;
  }
}
