﻿:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --line: #d8e1eb;
  --text: #132238;
  --muted: #56677f;
  --brand: #0f766e;
  --brand-strong: #0b5e58;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow: 0 10px 30px rgba(19, 34, 56, 0.08);
  --app-grad-1: #1a4f8a;
  --app-grad-2: #0f766e;
  --app-grad-3: #1b9cc5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(27, 156, 197, 0.2), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(26, 79, 138, 0.2), transparent 26%),
    linear-gradient(180deg, #dfe9f7 0%, #e9eff8 36%, #eef2f7 100%);
}

/* Guard page: use flat colors (no gradient) */
.guard-theme {
  background: #eef5fc;
}

.guard-theme .topbar {
  background: #0f2f4e;
  border: 1px solid #214d77;
  box-shadow: 0 10px 24px rgba(15, 47, 78, 0.24);
}

.guard-theme .topbar::before {
  border-color: rgba(255, 255, 255, 0.12);
}

.guard-theme .panel {
  background: #ffffff;
  border: 1px solid #cfdae8;
}

.guard-theme .bottom-nav {
  background: #112640;
  border: 1px solid #253f5e;
}

.mobile-app {
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 132px 14px 106px;
}

.mobile-app.login-mode {
  padding-top: 20px;
}

.topbar {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 8px);
  transform: translateX(-50%);
  width: min(500px, calc(100vw - 18px));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(206, 222, 243, 0.48);
  border-radius: 20px;
  background: linear-gradient(130deg, var(--app-grad-1) 0%, var(--app-grad-2) 56%, var(--app-grad-3) 100%);
  box-shadow: 0 14px 34px rgba(15, 47, 78, 0.28);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.topbar-main {
  min-width: 0;
}

.topbar-label {
  margin: 0 0 2px;
  font-size: .63rem;
  line-height: 1.2;
  letter-spacing: .9px;
  font-weight: 800;
  color: rgba(233, 245, 255, 0.9);
}

.topbar-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: .1px;
  color: #ffffff;
  text-shadow: 0 3px 12px rgba(5, 30, 57, 0.22);
}

.topbar-sub {
  margin: 4px 0 0;
  font-size: .82rem;
  color: rgba(226, 241, 255, 0.92);
}

.guard-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(226, 241, 255, 0.45);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  box-shadow: 0 6px 18px rgba(7, 40, 74, 0.2);
}

.guard-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #d9edff);
  color: #0f4a7c;
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
}

.guard-meta {
  min-width: 0;
}

.guard-meta strong {
  display: block;
  max-width: 128px;
  font-size: 1rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.screen { display: none; }
.screen.active { display: block; }

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 252, 255, 0.96) 100%);
  border: 1px solid #cfdae8;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 12px 30px rgba(19, 34, 56, 0.11);
}

.auth-panel {
  margin-top: 4dvh;
}

.auth-v2-wrap {
  min-height: calc(100dvh - 210px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.auth-v2-head {
  text-align: center;
}

.auth-v2-logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 12px;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
}

.auth-v2-logo .material-symbols-outlined {
  font-size: 40px;
}

.auth-v2-logo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
  display: block;
}

.auth-v2-title {
  margin: 0;
  font-family: "Public Sans", "Noto Sans Thai", sans-serif;
  font-size: 1.32rem;
  letter-spacing: 0.2px;
  color: #0f2f4e;
}

.auth-v2-subtitle {
  margin: 6px 0 0;
  color: #61758f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .4px;
}

.auth-v2-card {
  background: #fff;
  border: 2px solid #c8d2df;
  border-radius: 14px;
  padding: 18px 14px 14px;
  box-shadow: 0 10px 26px rgba(19, 34, 56, 0.08);
}

.auth-v2-label {
  margin-bottom: 8px;
  font-size: .93rem;
  font-weight: 800;
  color: #1c2f45;
}

.auth-v2-input-wrap {
  position: relative;
}

.auth-v2-input-wrap .auth-v2-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #76879c;
  font-size: 22px;
}

.auth-v2-input-wrap input {
  height: 48px;
  padding-left: 44px;
  margin-bottom: 12px;
  border: 2px solid #a7b9cd;
  border-radius: 8px;
}

.auth-v2-input-wrap input:focus {
  border-color: #0f2f4e;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(15, 47, 78, 0.12);
}

.auth-v2-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: #0f2f4e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Public Sans", "Noto Sans Thai", sans-serif;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease, opacity .12s ease, box-shadow .18s ease;
}

.auth-v2-btn:hover {
  background: #11365b;
  box-shadow: 0 12px 28px rgba(15, 47, 78, 0.18);
}

.auth-v2-btn:active {
  transform: translateY(1px);
}

.auth-v2-status {
  margin-top: 10px;
}

.auth-v2-footer {
  display: flex;
  justify-content: center;
}

.auth-v2-help-btn {
  border: 0;
  background: transparent;
  color: #5f738d;
  font-weight: 700;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
}

.gateway-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at top left, rgba(24, 125, 140, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 47, 78, 0.14), transparent 32%),
    linear-gradient(180deg, #eef5fc 0%, #e7f0fb 100%);
}

.gateway-stage {
  width: 100%;
  max-width: 1100px;
}

.gateway-auth-wrap {
  min-height: auto;
}

.gateway-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

.gateway-hero {
  display: none;
  padding: 28px;
  border: 1px solid rgba(160, 184, 208, 0.55);
  background:
    linear-gradient(150deg, rgba(255,255,255,0.96), rgba(245,249,255,0.92)),
    linear-gradient(135deg, #0f2f4e, #187d8c);
}

.gateway-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 47, 78, 0.08);
  color: #0f2f4e;
  font-size: 0.85rem;
  font-weight: 800;
}

.gateway-hero-title {
  margin: 18px 0 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  color: #12314f;
}

.gateway-hero-copy {
  margin: 0 0 24px;
  max-width: none;
  color: #49637d;
  font-size: 1rem;
  line-height: 1.7;
  white-space: nowrap;
}

.gateway-hero-points {
  display: grid;
  gap: 14px;
}

.gateway-point {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(177, 195, 214, 0.68);
}

.gateway-point .material-symbols-outlined {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e7f2ff;
  color: #0f2f4e;
  font-size: 26px;
}

.gateway-point strong {
  display: block;
  margin-bottom: 4px;
  color: #0f2f4e;
  font-size: 1rem;
}

.gateway-point span:last-child {
  color: #5f738d;
  line-height: 1.55;
}

.gateway-login-stack {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.gateway-login-head {
  margin-bottom: 6px;
}

.gateway-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.gateway-login-footer {
  margin-top: 2px;
}

@media (min-width: 900px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .gateway-shell {
    min-height: 100vh;
    height: 100vh;
    padding: 12px 20px;
    overflow: hidden;
  }

  .gateway-stage {
    height: 100%;
    max-width: 1420px;
  }

  .gateway-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, 430px);
    gap: 16px;
    height: 100%;
    align-items: stretch;
  }

  .gateway-hero {
    display: block;
    min-height: 0;
    height: 100%;
    padding: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .gateway-hero-title {
    margin: 14px 0 8px;
    font-size: clamp(2.4rem, 3.4vw, 4rem);
  }

  .gateway-hero-copy {
    margin-bottom: 16px;
    line-height: 1.52;
  }

  .gateway-hero-points {
    gap: 10px;
  }

  .gateway-point {
    padding: 14px 16px;
  }

  .auth-v2-wrap {
    min-height: 0;
    gap: 12px;
  }

  .gateway-login-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    max-width: none;
    height: 100%;
    min-height: 0;
    position: relative;
  }

  .gateway-card {
    padding: 18px 16px 14px;
    border-radius: 18px;
  }

  .gateway-login-head {
    margin: 0;
    min-height: 0;
  }

  .gateway-login-footer {
    position: static;
    margin-top: 0;
  }

  .auth-v2-logo {
    border-radius: 18px;
    margin: 0;
    max-height: min(57vh, 560px);
  }

  .auth-v2-logo-img {
    width: 100%;
    max-height: min(57vh, 560px);
    object-fit: contain;
  }

  .auth-v2-title {
    font-size: 1.55rem;
  }

  .auth-v2-subtitle {
    font-size: 0.92rem;
  }

  .auth-v2-input-wrap input,
  .auth-v2-btn {
    height: 54px;
  }
}

@media (max-width: 899px) {
  .gateway-shell {
    padding: 18px 14px;
  }

  .gateway-stage {
    max-width: 430px;
  }

  .auth-v2-wrap {
    min-height: calc(100dvh - 40px);
  }
}


h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: .9rem;
  font-weight: 700;
}

input, textarea, select {
  width: 100%;
  font: inherit;
  border: 1px solid #b7c7da;
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 10px;
  background: #fff;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(15, 118, 110, .2);
  border-color: #58a8a1;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, opacity .14s ease;
}

.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px) scale(.995); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-soft { background: #2f4968; color: #fff; }
.btn-warning { background: var(--warn); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#tourTitle {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.icon-btn:hover { background: #f1f6fc; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid #adc1d9;
  background: #f8fbff;
  color: #204264;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.chip:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.shift-cards,
.checkpoint-list {
  display: grid;
  gap: 10px;
}

.checkpoint-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shift-card,
.checkpoint-card,
.dashboard-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 12px;
}

.shift-card {
  cursor: pointer;
}

.checkpoint-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 116px;
}

.checkpoint-card.active {
  border-color: #3182ce;
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.15);
}

.checkpoint-card:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.shift-card:active {
  transform: scale(.997);
}

.shift-card h4,
.dashboard-card h4,
.checkpoint-card h4 {
  margin: 0 0 4px;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-shift-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #c8d7e8;
  box-shadow: 0 10px 24px rgba(19, 34, 56, 0.08);
  width: 100%;
  padding: 16px;
  border-radius: 18px;
}

.dashboard-empty {
  text-align: center;
  padding: 24px 16px;
}

#view-dashboard .panel {
  padding: 16px;
}

#view-dashboard .panel-head h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

#dashboardList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

.dashboard-shift-card h4 {
  font-size: 1.16rem;
  margin: 0;
}

.dashboard-time {
  margin-top: 4px;
  margin-bottom: 0;
  font-size: 0.96rem;
  color: #405a78;
}

.dashboard-progress-wrap {
  margin-top: 12px;
}

.dashboard-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.dashboard-progress-head span {
  font-size: .92rem;
  color: #536a85;
}

.dashboard-progress-head strong {
  font-size: 1rem;
  color: #0f2f4e;
}

.dashboard-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e4edf7;
  overflow: hidden;
}

.dashboard-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #1794a1);
}

.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dashboard-mini-card {
  border: 1px solid #d2deeb;
  border-radius: 12px;
  background: #fff;
  padding: 10px 8px;
  text-align: center;
}

.dashboard-mini-card .mini-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  margin-bottom: 4px;
}

.dashboard-mini-card.mini-incident .mini-icon {
  color: #8b1d3a;
  background: #fde8ef;
}

.dashboard-mini-card.mini-late .mini-icon {
  color: #8a6200;
  background: #fff4da;
}

.dashboard-mini-card.mini-error .mini-icon {
  color: #9b1c1c;
  background: #feecec;
}

.dashboard-mini-card span {
  display: block;
  font-size: .84rem;
  color: var(--muted);
}

.dashboard-mini-card strong {
  display: block;
  margin-top: 3px;
  font-size: 1.2rem;
  color: var(--text);
}

@media (min-width: 900px) {
  #view-dashboard .panel {
    padding: 20px;
  }

  #dashboardList {
    gap: 16px;
  }

  .dashboard-shift-card {
    padding: 18px;
  }

  .dashboard-shift-card h4 {
    font-size: 1.24rem;
  }

  .dashboard-progress-head span {
    font-size: .98rem;
  }

  .dashboard-progress-head strong {
    font-size: 1.06rem;
  }

  .dashboard-progress-bar {
    height: 14px;
  }

  .dashboard-mini-card strong {
    font-size: 1.28rem;
  }
}

.point-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.point-label {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 700;
}

.point-name {
  margin: 2px 0 4px;
  line-height: 1.2;
}

.point-no {
  font-size: 2rem;
  line-height: 1;
  color: #1d4f7f;
  font-weight: 800;
}

.meta {
  margin: 2px 0;
  font-size: .86rem;
  color: var(--muted);
}

.status-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: .76rem;
}

.status-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 2px;
  border: 1px solid transparent;
}

.status-icon.ok {
  color: #11612f;
  background: #dff7e7;
  border-color: #9fd8af;
}

.status-icon.wait {
  color: #8a6200;
  background: #fff3d6;
  border-color: #e8cf8b;
}

.status-icon.focus {
  color: #0f4f8c;
  background: #e1efff;
  border-color: #aacaf0;
}

.status-icon.ready {
  color: #44556e;
  background: #edf2f8;
  border-color: #ced9e6;
}

.status-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.status-text {
  color: #425670;
  font-weight: 600;
  font-size: .74rem;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}

.badge-open { background: #fff1c2; color: #705000; }
.badge-closed { background: #dff7e5; color: #1f7a35; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px;
}

.kpi-card span {
  display: block;
  font-size: .76rem;
  color: var(--muted);
}

.kpi-card strong { font-size: 1.1rem; }

.step-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfdff;
  padding: 10px;
  margin-bottom: 10px;
}

.tour-head-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid #264c78;
  border-radius: 12px;
  background: linear-gradient(120deg, #102844, #0e335f);
  color: #dbe6f5;
  font-weight: 800;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.tour-head-icon:hover {
  background: #1e3c5f;
}

.tour-head-icon .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
}


.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.quick-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 10px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.quick-card:hover {
  border-color: #8fb1d8;
}

.quick-card.done {
  border-color: #16a34a;
  background: #f0fdf4;
}

.quick-card.done .quick-icon {
  background: #dcfce7;
  color: #166534;
}

.quick-card:disabled,
.quick-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line);
}

.quick-card.done:disabled,
.quick-card.done.disabled {
  opacity: 1;
  cursor: not-allowed;
  border-color: #16a34a;
  background: #f0fdf4;
}

.quick-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e9f2ff;
  color: #1d4f7f;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 34px;
}

.quick-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.quick-sub {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.incident-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.incident-choice-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 104px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.incident-choice-card:hover {
  border-color: #8fb1d8;
  transform: translateY(-1px);
}

.incident-choice-card.active {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, .12);
  background: #f4fbf9;
}

#incidentChoiceHas.active {
  border-color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, .14);
  background: #fff4f4;
}

.incident-choice-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e9f2ff;
  color: #1d4f7f;
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 2px;
}

.incident-choice-card.active .incident-choice-icon {
  background: #d8f4ec;
  color: #0b5e58;
}

#incidentChoiceHas.active .incident-choice-icon {
  background: #ffe0e0;
  color: #b91c1c;
}

.incident-choice-text {
  font-size: .82rem;
  font-weight: 600;
  color: #24405e;
}

.incident-photo-icon-btn {
  width: 56px;
  height: 56px;
  border: 1px solid #b8c8dc;
  border-radius: 14px;
  background: #f7fbff;
  color: #1d4f7f;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
  margin: 6px 0 8px;
}

.incident-photo-icon-btn .material-symbols-outlined {
  font-size: 30px;
  line-height: 1;
}

.incident-photo-icon-btn:hover {
  transform: translateY(-1px);
  border-color: #8fb1d8;
  box-shadow: 0 8px 16px rgba(15, 47, 85, .12);
}

.incident-photo-icon-btn:active {
  transform: translateY(0);
  background: #eaf3ff;
}

.incident-photo-icon-btn:focus-visible {
  outline: 2px solid #1d4f7f;
  outline-offset: 2px;
}

.incident-photo-icon-btn.is-disabled,
.incident-photo-icon-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


.qr-box {
  min-height: 230px;
  border: 1px dashed #8da2b5;
  border-radius: 12px;
  overflow: hidden;
  background: #0a1f37;
  margin-bottom: 10px;
}

.preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}

.result {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0a1f37;
  color: #e6edf5;
  border-radius: 12px;
  padding: 10px;
  min-height: 40px;
}

.hint,
.status-text {
  font-size: .86rem;
  color: var(--muted);
  margin: 2px 0 8px;
}

#currentPointText {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #9ec0e6;
  background: linear-gradient(180deg, #edf5ff, #e7f1ff);
  color: #123f6c;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.3;
}

.status-chip {
  font-size: .84rem;
  color: #2d4866;
  background: #eaf3ff;
  border: 1px solid #c3d7f0;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 0 0 10px;
}

.checkpoint-card.done {
  border-color: #82cc9a;
  background: #edfdf1;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  transform: translateX(-50%);
  width: min(500px, calc(100vw - 18px));
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: linear-gradient(120deg, #102844, #0e335f);
  border: 1px solid #264c78;
  border-radius: 18px;
  padding: 8px;
  z-index: 25;
  box-shadow: 0 14px 28px rgba(9, 31, 56, 0.35);
}

.nav-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #dbe6f5;
  font-weight: 700;
  padding: 10px 8px;
  cursor: pointer;
}

.nav-btn.active {
  background: linear-gradient(135deg, #2a4f79, #1f6f8a);
  border-color: #5d8ec3;
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 49, 83, 0.35);
}

.nav-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.hidden { display: none !important; }

@media (max-width: 390px) {
  .mobile-app { padding-left: 10px; padding-right: 10px; }
  .panel { padding: 12px; }
  .topbar { padding: 10px; width: calc(100vw - 14px); }
  .topbar-title { font-size: 1.28rem; }
  .guard-avatar { width: 34px; height: 34px; }
  .guard-meta strong { max-width: 98px; font-size: .95rem; }
}

