:root {
  color-scheme: light;
  --bg: #06101d;
  --deep: #030913;
  --card: #0d1d30;
  --card2: #122640;
  --line: rgba(148, 163, 184, 0.17);
  --text: #f8fafc;
  --muted: #91a2b8;
  --blue: #18a0fb;
  --green: #28d17c;
  --amber: #f6b94a;
  --red: #fb6b72;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  background: var(--deep);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--deep);
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 50% -14rem,
      rgba(24, 160, 251, 0.2),
      transparent 30rem
    ),
    linear-gradient(180deg, #081522, var(--bg) 45%, var(--deep));
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.5);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.offline {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  padding: calc(8px + var(--safe-top)) 16px 8px;
  background: #9a3412;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}
.app {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: auto;
  border-inline: 1px solid rgba(148, 163, 184, 0.06);
  background: rgba(4, 13, 24, 0.72);
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.28);
}
.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: calc(70px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  background: rgba(5, 14, 25, 0.9);
  backdrop-filter: blur(20px);
}
.brand {
  display: flex;
  justify-self: center;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand > span:last-child strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 14px;
}
.brand small {
  margin-top: 2px;
  color: #54c6ff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #0ea5e9, #1765d7);
  box-shadow: 0 9px 24px rgba(14, 165, 233, 0.25);
  font-size: 14px;
  font-weight: 950;
}
.icon-btn,
.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(15, 30, 49, 0.8);
  cursor: pointer;
}
.icon-btn {
  font-size: 24px;
}
.avatar {
  justify-self: end;
  border-color: rgba(24, 160, 251, 0.25);
  background: rgba(24, 160, 251, 0.12);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 950;
}
.screen {
  min-height: calc(100vh - 70px);
  padding: 26px 20px calc(105px + var(--safe-bottom));
  animation: appear 0.3s ease both;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.center h1 {
  margin: 18px 0 7px;
  font-size: clamp(27px, 7vw, 36px);
}
.center > p {
  max-width: 390px;
  margin: 0;
}
.loader {
  position: relative;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(145deg, #16b5f4, #1757d4);
  box-shadow: 0 20px 60px rgba(17, 115, 213, 0.38);
  font-size: 26px;
  font-weight: 950;
}
.loader:before {
  position: absolute;
  inset: -11px;
  border: 2px solid rgba(56, 189, 248, 0.17);
  border-top-color: #38bdf8;
  border-radius: 32px;
  animation: spin 1.2s linear infinite;
  content: "";
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-bar {
  width: min(72vw, 300px);
  height: 4px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.13);
}
.loading-bar span {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  animation: load 1.2s infinite;
}
@keyframes load {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(240%);
  }
}
.heading {
  margin-bottom: 25px;
}
.heading h1,
.welcome h1,
.record-head h1 {
  margin: 7px 0 4px;
  font-size: clamp(27px, 7vw, 38px);
  line-height: 1.2;
}
.heading p,
.record-head p {
  margin: 0;
}
.eyebrow {
  margin: 0;
  color: #54c6ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
  line-height: 1.65;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 37, 60, 0.8);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 850;
}
.form-stack {
  display: grid;
  gap: 17px;
}
.field {
  position: relative;
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.field > span:first-child {
  font-weight: 850;
}
.field small {
  color: var(--muted);
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(12, 28, 46, 0.9);
  color: var(--text);
}
.field input,
.field select {
  min-height: 54px;
  padding: 0 15px;
}
.field textarea {
  min-height: 118px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #7dd3fc 50%),
    linear-gradient(135deg, #7dd3fc 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 23px,
    calc(100% - 13px) 23px;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}
.field select:disabled {
  opacity: 0.55;
}
.short {
  max-width: 240px;
}
.count {
  position: absolute;
  right: 12px;
  bottom: 9px;
  font-size: 10px;
}
.line-select {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 24, 40, 0.55);
}
.line-select legend {
  font-size: 13px;
  font-weight: 850;
}
.line-select p,
.help {
  margin: 3px 0 12px;
  color: var(--muted);
  font-size: 11px;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.check-grid label {
  position: relative;
}
.check-grid input {
  position: absolute;
  opacity: 0;
}
.check-grid span {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 36, 58, 0.72);
  font-size: 11px;
}
.check-grid span:before {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 7px;
  content: "";
}
.check-grid input:checked + span {
  border-color: rgba(24, 160, 251, 0.55);
  background: rgba(24, 160, 251, 0.13);
}
.check-grid input:checked + span:before {
  border-color: var(--blue);
  background: var(--blue);
  content: "✓";
}
.btn {
  min-height: 54px;
  border-radius: 17px;
  font-weight: 900;
  cursor: pointer;
}
.btn:active {
  transform: scale(0.985);
}
.btn:disabled {
  cursor: wait;
  opacity: 0.55;
}
.primary,
.success,
.secondary,
.danger {
  width: 100%;
}
.primary {
  border: 0;
  background: linear-gradient(135deg, #1eb7f2, #1164dc);
  box-shadow: 0 13px 32px rgba(13, 111, 213, 0.28);
}
.success {
  border: 0;
  background: linear-gradient(135deg, #2dd486, #059669);
}
.secondary {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 31, 51, 0.9);
}
.danger {
  border: 1px solid rgba(251, 107, 114, 0.35);
  background: rgba(251, 107, 114, 0.14);
  color: #fecdd3;
}
.text {
  border: 0;
  background: transparent;
  color: #7dd3fc;
}
.small-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 29, 48, 0.8);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.welcome,
.record-head,
.title-row,
.summary-head,
.progress-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.welcome {
  margin-bottom: 19px;
}
.hero {
  padding: 21px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 25px;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(56, 189, 248, 0.2),
      transparent 13rem
    ),
    linear-gradient(145deg, rgba(13, 43, 70, 0.96), rgba(8, 27, 46, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.ready {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(40, 209, 124, 0.22);
  border-radius: 999px;
  background: rgba(40, 209, 124, 0.13);
  color: #93f6c0;
  font-size: 9px;
  font-weight: 950;
}
.ready i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.hero h2 {
  margin: 13px 0 4px;
  font-size: 22px;
}
.hero > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.shifts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 19px;
}
.shifts button {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(5, 17, 31, 0.64);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.shifts button.active {
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(15, 116, 175, 0.18);
  color: #e0f2fe;
}
.shifts b {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.1);
  font-size: 17px;
}
.shifts strong,
.shifts small {
  display: block;
}
.shifts strong {
  font-size: 11px;
}
.shifts small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.progress-card {
  margin: 14px 0 27px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(11, 26, 43, 0.76);
}
.progress-card > div {
  color: var(--muted);
  font-size: 11px;
}
.progress-card > div strong {
  color: var(--text);
}
.progress-card > i {
  display: block;
  height: 7px;
  margin: 11px 0 9px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.11);
}
.progress-card > i span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c9ee, #27d17c);
  transition: width 0.4s;
}
.progress-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.title-row {
  margin-bottom: 13px;
}
.title-row h2 {
  margin: 4px 0 0;
  font-size: 18px;
}
.title-row em {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(251, 107, 114, 0.13);
  color: #fda4af;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}
.line-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.line-card {
  position: relative;
  min-height: 110px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 29, 48, 0.82);
  text-align: left;
  cursor: pointer;
}
.line-card.reported {
  border-color: rgba(40, 209, 124, 0.28);
  background: linear-gradient(
    145deg,
    rgba(13, 48, 47, 0.77),
    rgba(11, 28, 44, 0.88)
  );
}
.line-card code {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  font: 900 8px inherit;
}
.line-card strong,
.line-card small {
  display: block;
}
.line-card strong {
  margin: 10px 0 3px;
  font-size: 13px;
}
.line-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-card mark {
  position: absolute;
  right: 11px;
  top: 11px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #032715;
  font-size: 11px;
  font-weight: 950;
}
.empty {
  padding: 38px 18px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 21px;
  text-align: center;
}
.state-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: auto;
  place-items: center;
  border-radius: 19px;
  background: rgba(24, 160, 251, 0.13);
  color: #7dd3fc;
  font-size: 26px;
  font-weight: 950;
}
.state-icon.red {
  background: rgba(251, 107, 114, 0.13);
  color: #fda4af;
}
.red-text {
  color: #fda4af;
}
.green-text {
  color: #86efac;
}
.record-head {
  align-items: center;
}
.record-head .saved {
  flex: none;
  color: #86efac;
}
.record-head .saving {
  color: #fde68a;
}
.record-head .save-error {
  color: #fda4af;
}
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 27px;
}
.steps:before {
  position: absolute;
  top: 15px;
  right: 16%;
  left: 16%;
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
  content: "";
}
.steps > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #657890;
}
.steps b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 50%;
  background: #0b1a2c;
  font-size: 10px;
}
.steps small {
  font-size: 8px;
}
.steps .active {
  color: #7dd3fc;
}
.steps .active b {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 0 0 6px rgba(24, 160, 251, 0.12);
}
.panel {
  margin-bottom: 15px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(11, 27, 45, 0.74);
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.status-option {
  min-height: 78px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(9, 23, 39, 0.72);
  text-align: left;
  cursor: pointer;
}
.status-option.active {
  border-color: var(--status);
  background: color-mix(in srgb, var(--status) 13%, transparent);
}
.status-option i {
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: var(--status);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--status) 13%, transparent);
}
.status-option strong,
.status-option small {
  display: block;
}
.status-option strong {
  font-size: 11px;
}
.status-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.photo-list {
  display: grid;
  gap: 9px;
}
.photo-topic {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 21, 36, 0.68);
}
.photo-topic.uploaded {
  border-color: rgba(40, 209, 124, 0.28);
}
.topic-no {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: rgba(56, 189, 248, 0.11);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 950;
}
.uploaded .topic-no {
  background: rgba(40, 209, 124, 0.13);
  color: #86efac;
}
.topic-no img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-no .photo-check {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 2px solid #07111f;
  border-radius: 50%;
  background: var(--green);
  color: #052e1a;
  font-size: 10px;
}
.topic-copy strong,
.topic-copy small {
  display: block;
}
.topic-copy strong {
  font-size: 11px;
}
.topic-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.required {
  color: #fda4af;
}
.photo-action {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  background: rgba(24, 160, 251, 0.13);
  color: #7dd3fc;
  font-size: 17px;
  cursor: pointer;
}
.photo-topic.uploading {
  border-color: rgba(246, 185, 74, 0.35);
}
.photo-topic.uploading .topic-copy small {
  color: #fde68a;
}
.photo-topic.upload-error {
  border-color: rgba(251, 107, 114, 0.42);
}
.photo-topic.upload-error .topic-copy small {
  color: #fda4af;
}
.delete-photo {
  grid-column: 2/4;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fda4af;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.toggle-card {
  display: grid;
  grid-template-columns: 43px 1fr;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(10, 23, 39, 0.72);
  cursor: pointer;
}
.toggle-card input {
  position: absolute;
  opacity: 0;
}
.toggle-card > i {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #2a3a4d;
}
.toggle-card > i:after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
  content: "";
}
.toggle-card input:checked + i {
  background: var(--blue);
}
.toggle-card input:checked + i:after {
  transform: translateX(18px);
}
.toggle-card strong,
.toggle-card small {
  display: block;
}
.toggle-card strong {
  font-size: 11px;
}
.toggle-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.actions {
  display: grid;
  gap: 7px;
  margin-top: 19px;
}
.summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: rgba(11, 27, 45, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.summary-head {
  padding: 19px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(56, 189, 248, 0.16),
      transparent 10rem
    ),
    rgba(13, 36, 59, 0.7);
}
.summary-head h2 {
  margin: 9px 0 2px;
  font-size: 23px;
}
.summary-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.summary-head > strong {
  display: grid;
  min-width: 80px;
  min-height: 72px;
  place-items: center;
  padding: 9px;
  border: 1px solid var(--status);
  border-radius: 16px;
  background: color-mix(in srgb, var(--status) 13%, transparent);
  color: var(--status);
  font-size: 11px;
  text-align: center;
}
.summary dl,
.profile-card dl {
  margin: 0;
  padding: 4px 19px;
}
.summary dl div,
.profile-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.summary dl div:last-child,
.profile-card dl div:last-child {
  border: 0;
}
.summary dt,
.profile-card dt {
  color: var(--muted);
  font-size: 10px;
}
.summary dd,
.profile-card dd {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}
.review-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 13px;
}
.review-photos article {
  overflow: hidden;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(11, 27, 45, 0.74);
}
.review-photos img {
  width: calc(100% + 22px);
  height: 120px;
  margin: -11px -11px 10px;
  object-fit: cover;
  background: #06101d;
}
.review-photos span,
.review-photos strong {
  display: block;
}
.file-picker {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.source-actions {
  display: grid;
  gap: 10px;
  margin: 20px 0 12px;
}
.source-btn {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 10px 14px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 17px;
  background: rgba(24, 160, 251, 0.1);
  text-align: left;
  cursor: pointer;
}
.source-btn b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: rgba(24, 160, 251, 0.16);
  font-size: 21px;
}
.source-btn strong,
.source-btn small {
  display: block;
}
.source-btn small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.review-photos span {
  color: #7dd3fc;
  font-size: 8px;
}
.review-photos strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.success-ring {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 14px solid rgba(40, 209, 124, 0.06);
  border-radius: 50%;
  background: linear-gradient(145deg, #34d399, #059669);
  box-shadow: 0 20px 70px rgba(5, 150, 105, 0.2);
  font-size: 29px;
  font-weight: 950;
}
.receipt {
  display: grid;
  width: min(100%, 390px);
  gap: 4px;
  margin: 23px 0;
  padding: 15px;
  border: 1px dashed rgba(125, 211, 252, 0.28);
  border-radius: 15px;
  background: rgba(24, 160, 251, 0.12);
}
.receipt span {
  color: var(--muted);
  font-size: 9px;
}
.receipt strong {
  color: #7dd3fc;
  font-size: 11px;
  word-break: break-all;
}
.center .btn {
  width: min(100%, 390px);
}
.modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 20px calc(20px + var(--safe-bottom));
  background: rgba(1, 6, 13, 0.78);
  backdrop-filter: blur(8px);
}
.modal > article {
  position: relative;
  width: min(100%, 460px);
  padding: 23px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 25px;
  background: linear-gradient(160deg, #12253b, #091728);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}
.modal h2 {
  margin: 7px 0 8px;
  font-size: 22px;
}
.modal .state-icon {
  margin: 0 0 17px;
}
.modal .primary,
.modal .danger {
  margin-top: 17px;
}
.modal .secondary {
  margin-top: 8px;
}
.draft-summary {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 17, 31, 0.64);
}
.draft-summary span {
  color: var(--muted);
  font-size: 10px;
}
.profile-card {
  text-align: center;
}
.close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(6, 18, 31, 0.7);
  color: var(--muted);
  font-size: 20px;
}
.profile-avatar {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #0ea5e9, #1757d4);
  font-weight: 950;
}
.toasts {
  position: fixed;
  z-index: 120;
  right: 15px;
  bottom: calc(17px + var(--safe-bottom));
  left: 15px;
  display: grid;
  justify-items: center;
  gap: 7px;
  pointer-events: none;
}
.toast {
  width: min(100%, 460px);
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 13px;
  background: rgba(13, 29, 48, 0.97);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  font-size: 11px;
  font-weight: 750;
}
.toast.error {
  border-color: rgba(251, 107, 114, 0.3);
  background: rgba(65, 22, 31, 0.97);
  color: #fecdd3;
}
.toast.success {
  border-color: rgba(40, 209, 124, 0.3);
  background: rgba(9, 51, 42, 0.97);
  color: #bbf7d0;
}
pre {
  width: min(100%, 520px);
  max-height: 180px;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #020711;
  color: #fda4af;
  text-align: left;
  white-space: pre-wrap;
}
@media (min-width: 620px) {
  .screen {
    padding-inline: 32px;
  }
  .line-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .modal {
    place-items: center;
  }
  .form-stack {
    grid-template-columns: 1fr 1fr;
  }
  .form-stack > * {
    grid-column: 1/-1;
  }
  .form-stack > .field:nth-child(1) {
    grid-column: 1;
  }
  .form-stack > .field:nth-child(2) {
    grid-column: 2;
  }
}
@media (max-width: 390px) {
  .screen {
    padding-inline: 14px;
  }
  .topbar {
    padding-inline: 11px;
  }
  .hero,
  .panel {
    padding: 14px;
  }
  .shifts button {
    padding: 8px;
    gap: 6px;
  }
  .line-card {
    padding: 11px;
    min-height: 102px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   5S MANAGEMENT SYSTEM V2.0.3 — LIGHT THEME
   Bright mobile-first palette with a green 5S identity.
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #f4f8f5;
  --deep: #eef5f0;
  --card: #ffffff;
  --card2: #f7faf8;
  --line: #dce7df;
  --text: #17251c;
  --muted: #65756a;
  --blue: #15803d;
  --green: #15803d;
  --amber: #d97706;
  --red: #dc2626;
  background: var(--deep);
  color: var(--text);
}

html {
  background: var(--deep);
}

body {
  background:
    radial-gradient(circle at 50% -10rem, rgba(34, 197, 94, 0.14), transparent 28rem),
    linear-gradient(180deg, #fbfefc 0%, var(--bg) 48%, var(--deep) 100%);
  color: var(--text);
}

button {
  color: var(--text);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline-color: rgba(22, 163, 74, 0.34);
}

.offline {
  border-bottom: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.app {
  border-inline-color: rgba(22, 101, 52, 0.07);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 0 70px rgba(51, 79, 59, 0.08);
}

.topbar {
  border-bottom-color: rgba(20, 83, 45, 0.14);
  background: rgba(21, 128, 61, 0.97);
  box-shadow: 0 5px 20px rgba(21, 128, 61, 0.16);
}

.brand,
.brand strong {
  color: #ffffff;
}

.brand small {
  color: #dcfce7;
}

.logo {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  color: #ffffff;
}

.icon-btn,
.avatar {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.loader {
  background: linear-gradient(145deg, #15803d, #166534);
  box-shadow: 0 20px 52px rgba(22, 163, 74, 0.2);
  color: #ffffff;
}

.loader:before {
  border-color: rgba(22, 163, 74, 0.14);
  border-top-color: #22c55e;
}

.loading-bar {
  background: #dce7df;
}

.loading-bar span {
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
}

.eyebrow {
  color: #15803d;
}

.pill {
  border-color: #dce7df;
  background: #f1f7f3;
  color: #405047;
}

.field {
  color: #34463a;
}

.field input,
.field select,
.field textarea {
  border-color: #d4e1d8;
  background-color: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(35, 58, 42, 0.03);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa8a0;
}

.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, #16a34a 50%),
    linear-gradient(135deg, #16a34a 50%, transparent 50%);
}

.line-select {
  border-color: #dce7df;
  background: #f8fbf9;
}

.check-grid span {
  border-color: #dce7df;
  background: #ffffff;
}

.check-grid span:before {
  border-color: #aebdb3;
  background: #ffffff;
}

.check-grid input:checked + span {
  border-color: rgba(22, 163, 74, 0.46);
  background: #ecfdf3;
  color: #166534;
}

.check-grid input:checked + span:before {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.primary {
  background: linear-gradient(135deg, #15803d, #166534);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.2);
  color: #ffffff;
}

.success {
  background: linear-gradient(135deg, #15803d, #166534);
  color: #ffffff;
}

.secondary {
  border-color: #d5e2d9;
  background: #ffffff;
  color: #26372b;
}

.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.text {
  color: #15803d;
}

.small-btn {
  border-color: #cfe0d4;
  background: #ffffff;
  color: #15803d;
}

.hero {
  border-color: #bde7ca;
  background:
    radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.15), transparent 13rem),
    linear-gradient(145deg, #f0fdf4, #ffffff);
  box-shadow: 0 18px 50px rgba(48, 77, 56, 0.08);
}

.ready {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #166534;
}

.shifts button {
  border-color: #dce7df;
  background: #ffffff;
  color: #53635a;
}

.shifts button.active {
  border-color: #22c55e;
  background: #eafbf0;
  color: #166534;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.09);
}

.shifts b {
  background: #edf4ef;
}

.progress-card {
  border-color: #dce7df;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(48, 77, 56, 0.05);
}

.progress-card > i {
  background: #e4ece7;
}

.progress-card > i span {
  background: linear-gradient(90deg, #4ade80, #15803d);
}

.title-row em {
  background: #fff1f2;
  color: #be123c;
}

.line-card {
  border-color: #dce7df;
  background: #ffffff;
  box-shadow: 0 7px 22px rgba(48, 77, 56, 0.05);
}

.line-card:active {
  background: #f6fbf7;
}

.line-card.reported {
  border-color: #a7e8bb;
  background: linear-gradient(145deg, #ecfdf3, #ffffff);
}

.line-card code {
  background: #edf8f0;
  color: #15803d;
}

.line-card mark {
  background: #15803d;
  color: #ffffff;
}

.empty {
  border-color: #cddbd1;
  background: rgba(255, 255, 255, 0.5);
}

.state-icon {
  background: #eaf8ee;
  color: #15803d;
}

.state-icon.red {
  background: #fff1f2;
  color: #dc2626;
}

.red-text,
.required,
.delete-photo,
.photo-topic.upload-error .topic-copy small {
  color: #dc2626;
}

.green-text,
.record-head .saved {
  color: #15803d;
}

.record-head .saving,
.photo-topic.uploading .topic-copy small {
  color: #b45309;
}

.record-head .save-error {
  color: #dc2626;
}

.steps:before {
  background: #d7e3da;
}

.steps > span {
  color: #89988e;
}

.steps b {
  border-color: #d4e1d8;
  background: #ffffff;
}

.steps .active {
  color: #15803d;
}

.steps .active b {
  border-color: #15803d;
  background: #15803d;
  color: #ffffff;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.1);
}

.panel {
  border-color: #dce7df;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(48, 77, 56, 0.04);
}

.status-option {
  border-color: #dce7df;
  background: #fbfdfb;
}

.status-option.active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--status) 10%, transparent);
}

.photo-topic {
  border-color: #dce7df;
  background: #fbfdfb;
}

.photo-topic.uploaded {
  border-color: #a7e8bb;
  background: #f3fcf6;
}

.topic-no {
  background: #eaf8ee;
  color: #15803d;
}

.uploaded .topic-no {
  background: #dcfce7;
  color: #15803d;
}

.topic-no .photo-check {
  border-color: #ffffff;
  color: #ffffff;
}

.photo-action {
  border-color: #bde7ca;
  background: #eaf8ee;
  color: #15803d;
}

.photo-topic.uploading {
  border-color: #f3c77b;
  background: #fffbeb;
}

.photo-topic.upload-error {
  border-color: #fca5a5;
  background: #fff7f7;
}

.toggle-card {
  border-color: #dce7df;
  background: #f8fbf9;
}

.toggle-card > i {
  background: #cbd7ce;
}

.toggle-card input:checked + i {
  background: #16a34a;
}

.summary {
  border-color: #dce7df;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(48, 77, 56, 0.08);
}

.summary-head {
  border-bottom-color: #dce7df;
  background:
    radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.12), transparent 10rem),
    #f4fbf6;
}

.review-photos article {
  border-color: #dce7df;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(48, 77, 56, 0.04);
}

.review-photos img {
  background: #edf4ef;
}

.review-photos span {
  color: #15803d;
}

.source-btn {
  border-color: #bde7ca;
  background: #f0fdf4;
}

.source-btn b {
  background: #dcfce7;
}

.success-ring {
  border-color: #e9f9ee;
  color: #ffffff;
}

.receipt {
  border-color: #9fd9b0;
  background: #f0fdf4;
}

.receipt strong {
  color: #15803d;
}

.modal {
  background: rgba(22, 36, 26, 0.44);
}

.modal > article {
  border-color: #d7e3da;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(28, 49, 34, 0.22);
}

.draft-summary {
  border-color: #dce7df;
  background: #f7faf8;
}

.close {
  border-color: #dce7df;
  background: #f4f8f5;
  color: #65756a;
}

.profile-avatar {
  background: linear-gradient(145deg, #15803d, #166534);
  color: #ffffff;
}

.toast {
  border-color: #d6e3da;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 38px rgba(28, 49, 34, 0.16);
  color: #26372b;
}

.toast.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.toast.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

pre {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

/* =========================================================
   5S MANAGEMENT SYSTEM V2.0.4 — PROFILE & LANGUAGE FLOW
   Header alignment, profile editing, and language-first setup.
   ========================================================= */
.brand-copy {
  min-width: 0;
}

.topbar > #back {
  grid-column: 1;
}

.topbar > .brand {
  grid-column: 2;
}

.topbar > .avatar {
  grid-column: 3;
}

.brand-copy strong {
  white-space: nowrap;
}

.brand-copy small {
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
}

.welcome > div {
  min-width: 0;
}

#dateChip {
  min-width: 104px;
  padding-inline: 12px;
  text-align: center;
  white-space: nowrap;
}

.profile-card dl {
  margin-top: 4px;
}

.profile-edit {
  width: calc(100% - 38px);
  margin: 14px 19px 2px;
}

body.modal-open {
  overflow: hidden;
}

.language-modal {
  z-index: 95;
  place-items: center;
}

.language-modal > article {
  overflow: hidden;
  padding: 26px;
  text-align: center;
}

.language-modal > article::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #15803d, #4ade80);
  content: "";
}

.language-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  place-items: center;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 25px;
  font-weight: 950;
}

.language-modal .muted {
  max-width: 340px;
  margin: 0 auto;
}

.language-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.language-actions button {
  display: grid;
  grid-template-columns: 46px 1fr 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #d7e3da;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(28, 49, 34, 0.05);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.language-actions button:hover,
.language-actions button:focus-visible {
  border-color: #86d69d;
  background: #f5fcf7;
  transform: translateY(-1px);
}

.language-actions button > b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
}

.language-actions span,
.language-actions strong,
.language-actions small {
  display: block;
}

.language-actions strong {
  color: #17251c;
  font-size: 14px;
}

.language-actions small {
  margin-top: 2px;
  color: #65756a;
  font-size: 10px;
}

.language-actions i {
  color: #15803d;
  font-size: 18px;
  font-style: normal;
}

@media (max-width: 390px) {
  .brand {
    gap: 8px;
  }

  .logo {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand small {
    font-size: 7px;
  }

  #dateChip {
    min-width: 98px;
    padding-inline: 10px;
  }
}
