* {
  box-sizing: border-box;
}

:root {
  --green-900: #0b5a22;
  --green-700: #118e1d;
  --green-500: #20a33c;
  --blue-900: #0a2d67;
  --blue-700: #0c4aa3;
  --blue-500: #2e75d2;
  --gold-700: #b58c19;
  --gold-500: #d9b131;
  --gold-300: #f3df7a;
  --ink: #102034;
  --muted: #5b6d7e;
  --line: rgba(16, 32, 52, 0.1);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --success-soft: rgba(17, 142, 29, 0.12);
  --warning-soft: rgba(217, 177, 49, 0.18);
  --danger-soft: rgba(210, 73, 73, 0.12);
  --danger: #d24949;
  --shadow: 0 24px 60px rgba(9, 35, 64, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(12, 74, 163, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(17, 142, 29, 0.22), transparent 26%),
    linear-gradient(180deg, #0c3f84 0%, #11705a 30%, #edf7f5 100%);
}

html {
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 88%);
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.78fr);
  gap: 20px;
}

.app-shell {
  width: min(1380px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.login-hero,
.login-panel,
.topbar,
.card,
.camera-sheet,
.preview-sheet,
.app-dialog-sheet {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-hero,
.login-panel,
.topbar,
.card,
.camera-sheet,
.preview-sheet,
.app-dialog-sheet {
  padding: 24px;
}

.login-hero {
  color: white;
  background:
    linear-gradient(140deg, rgba(12, 74, 163, 0.86), rgba(17, 142, 29, 0.8)),
    var(--surface);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-line,
.topbar-brand,
.topbar,
.topbar-actions,
.section-head,
.inline-actions,
.role-switch,
.section-nav,
.icon-cluster,
.stacked-lines,
.current-shift-grid,
.zoom-banner {
  display: flex;
  gap: 12px;
}

.brand-line {
  align-items: center;
}

.brand-line.large {
  margin-bottom: 24px;
}

.brand-line.compact {
  margin-bottom: 18px;
}

.brand-logo {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(9, 34, 62, 0.18));
}

.brand-logo.small {
  width: 56px;
  height: 56px;
}

.eyebrow {
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--muted);
}

.login-hero .eyebrow,
.topbar .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.36rem;
  line-height: 1.18;
}

.lead,
.topbar-subtext {
  line-height: 1.7;
}

.lead {
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.92);
}

.topbar-subtext {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
}

.topbar-user-label {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.92rem;
  line-height: 1.3;
}

.hero-steps,
.summary-grid,
.grid-2,
.indicator-list,
.detail-grid,
.coordinate-list,
.task-editor-list,
.task-result-stack,
.guide-list,
.chart-bars,
.preview-grid {
  display: grid;
  gap: 14px;
}

.hero-steps {
  margin-top: 26px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.summary-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-grid.eight {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.summary-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.hero-card,
.metric-card,
.feature-callout,
.guide-item,
.chart-bar-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-card span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.hero-card p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
}

.metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 246, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.54);
}

.metric-card p {
  color: var(--muted);
  margin-bottom: 10px;
}

.metric-card strong {
  font-size: 1.92rem;
  letter-spacing: -0.04em;
}

.compact-metrics .metric-card strong {
  font-size: 1.68rem;
}

.feature-callout,
.guide-item {
  background: linear-gradient(135deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.1));
  border: 1px solid rgba(16, 32, 52, 0.06);
}

.guide-item p,
.feature-callout p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.topbar {
  justify-content: space-between;
  align-items: flex-start;
  color: white;
  margin-bottom: 18px;
  background:
    linear-gradient(140deg, rgba(12, 74, 163, 0.86), rgba(17, 142, 29, 0.76)),
    var(--surface);
}

.topbar-brand {
  align-items: center;
}

.topbar-actions {
  align-items: center;
}

.wrap-actions {
  flex-wrap: wrap;
}

.role-switch,
.section-nav {
  flex-wrap: wrap;
}

.role-switch {
  padding: 6px;
  border-radius: 999px;
  background: rgba(16, 32, 52, 0.06);
  margin-bottom: 18px;
}

.section-nav {
  margin-bottom: 18px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.role-button,
.nav-button,
.ghost-button,
.primary-button,
.icon-button,
.status-choice,
.photo-trigger {
  border: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background-color 160ms ease;
}

.role-button,
.nav-button,
.ghost-button {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid rgba(16, 32, 52, 0.08);
  text-decoration: none;
}

.role-button.active,
.nav-button.active,
.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--blue-700), var(--green-700));
  box-shadow: 0 14px 26px rgba(12, 74, 163, 0.22);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 700;
  text-decoration: none;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(16, 32, 52, 0.08);
}

.icon-button.danger {
  background: rgba(210, 73, 73, 0.12);
  color: #a02c2c;
}

.icon-link {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(16, 32, 52, 0.06);
  text-decoration: none;
}

.icon-stack,
.photo-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-stack {
  align-items: center;
}

.mini-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.photo-trigger {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 8px 6px;
  border-radius: 14px;
  background: rgba(16, 32, 52, 0.06);
}

.photo-trigger span {
  font-size: 1.05rem;
}

.photo-trigger small {
  font-size: 0.73rem;
  color: var(--muted);
}

.photo-trigger.muted {
  opacity: 0.5;
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

button:disabled,
.disabled-link {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.form-stack,
.form-grid,
.filter-grid {
  display: grid;
  gap: 14px;
}

.form-grid,
.filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-stack label,
.form-grid label,
.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  min-width: 0;
}

.full-span {
  grid-column: 1 / -1;
}

.scroll-target {
  scroll-margin-top: 118px;
}

.mobile-panel-toolbar {
  display: none;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-menu-panel {
  display: grid;
  gap: 10px;
}

.mobile-menu-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(12, 74, 163, 0.1);
}

.mobile-menu-toggle-copy {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mobile-nav-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mobile-nav-control span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.mobile-nav-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mobile-nav-icon {
  font-size: 0.95rem;
}

.login-support {
  margin-top: 14px;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 32, 52, 0.12);
  background: var(--surface-strong);
  color: var(--ink);
}

input[type="date"],
input[type="week"],
input[type="month"],
input[type="datetime-local"] {
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(12, 74, 163, 0.22);
  outline-offset: 2px;
}

.status-box,
.current-shift-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.6;
}

.status-box {
  background: rgba(12, 74, 163, 0.08);
  color: #0c4aa3;
}

.status-box.warning {
  background: var(--warning-soft);
  color: #8b6516;
}

.status-box.error {
  background: var(--danger-soft);
  color: #a02c2c;
}

.current-shift-box {
  background: rgba(16, 32, 52, 0.04);
  border: 1px solid var(--line);
}

.section-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.panel-page {
  display: none;
}

.panel-page.active {
  display: block;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(16, 32, 52, 0.04);
}

.detail-grid strong {
  display: block;
  margin-top: 6px;
}

.indicator-list,
.coordinate-list {
  gap: 10px;
}

.status-flag,
.detail-row,
.coordinate-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.status-flag {
  justify-content: flex-start;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.status-dot.ready {
  background: var(--green-700);
}

.status-dot.not-ready {
  background: var(--danger);
}

.detail-row span,
.coordinate-list span,
.muted {
  color: var(--muted);
}

.profile-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
}

.profile-photo {
  min-height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 2px);
  background: linear-gradient(145deg, rgba(12, 74, 163, 0.12), rgba(17, 142, 29, 0.14));
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-list,
.task-result-stack {
  gap: 12px;
}

.zoom-banner {
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(12, 74, 163, 0.08), rgba(17, 142, 29, 0.12));
}

.current-shift-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.current-shift-grid div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.task-editor-item,
.task-check-item,
.empty-panel,
.task-result-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.task-editor-head,
.task-check-head,
.task-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.task-check-head,
.task-result-head {
  margin-bottom: 12px;
}

.task-check-item.completed {
  border-color: rgba(17, 142, 29, 0.24);
  background: rgba(17, 142, 29, 0.06);
}

.task-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-choice {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(16, 32, 52, 0.06);
}

.status-choice.active.success {
  background: var(--success-soft);
  color: #0b6b20;
}

.status-choice.active.warning {
  background: var(--warning-soft);
  color: #8b6516;
}

.status-choice.active.danger {
  background: var(--danger-soft);
  color: #a02c2c;
}

.task-help,
.task-note,
.camera-caption {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.success-text {
  color: var(--green-700);
}

.spaced-top {
  margin-top: 14px;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.task-chip.ready {
  background: var(--success-soft);
  color: #0b6b20;
}

.task-chip.warning {
  background: var(--warning-soft);
  color: #8b6516;
}

.task-chip.danger {
  background: var(--danger-soft);
  color: #a02c2c;
}

.task-chip.carry {
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-700);
}

.task-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.task-bullets li {
  line-height: 1.55;
}

.task-bullets li.done span {
  text-decoration: line-through;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}

tbody td {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px 0;
}

.stacked-lines {
  flex-direction: column;
  align-items: flex-start;
}

.chart-bars {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: end;
  min-height: 250px;
}

.overview-chart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.chart-bars.compact {
  min-height: 180px;
}

.chart-section {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.chart-bar-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 248, 245, 0.96));
}

.chart-bar-track {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: end;
  padding: 10px;
  border-radius: 18px;
  background: rgba(16, 32, 52, 0.05);
}

.chart-bar {
  width: 100%;
  border-radius: 14px;
}

.fill-blue {
  background: linear-gradient(180deg, #5896ea, #0c4aa3);
}

.fill-green {
  background: linear-gradient(180deg, #4cbe59, #118e1d);
}

.fill-teal {
  background: linear-gradient(180deg, #47c0aa, #13886e);
}

.fill-gold {
  background: linear-gradient(180deg, #f1d16f, #c59a20);
}

.fill-danger {
  background: linear-gradient(180deg, #f08f8f, #d24949);
}

.fill-carry {
  background: linear-gradient(180deg, #8cb5ff, #4467cf);
}

.pie-panel,
.chart-legend {
  display: grid;
  gap: 12px;
}

.pie-chart {
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  background: rgba(16, 32, 52, 0.08);
  box-shadow: inset 0 0 0 1px rgba(16, 32, 52, 0.06);
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(16, 32, 52, 0.05);
}

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.map-card {
  display: grid;
  gap: 14px;
}

.notification-list {
  display: grid;
  gap: 12px;
}

.widget-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(12, 74, 163, 0.28) transparent;
}

.widget-scroll::-webkit-scrollbar {
  width: 8px;
}

.widget-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.widget-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(12, 74, 163, 0.24);
}

.widget-scroll.three-cards {
  max-height: 412px;
  align-content: start;
  scroll-snap-type: y proximity;
}

.notification-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-counter {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 12px 22px rgba(210, 73, 73, 0.22);
}

.notification-item {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  appearance: none;
  cursor: pointer;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

.notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notification-title {
  color: var(--blue-700);
  font-weight: 700;
  line-height: 1.4;
}

.notification-state-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-700);
}

.notification-state-chip.warning {
  background: rgba(197, 154, 32, 0.16);
  color: #8b6516;
}

.notification-state-chip.error {
  background: rgba(210, 73, 73, 0.16);
  color: #a02c2c;
}

.notification-state-chip.info {
  background: rgba(12, 74, 163, 0.12);
  color: var(--blue-700);
}

.notification-state-chip.ready {
  background: rgba(17, 142, 29, 0.14);
  color: var(--green-700);
}

.notification-state-chip.muted {
  background: rgba(91, 109, 126, 0.12);
  color: var(--muted);
}

.notification-item p {
  margin: 0;
  color: var(--muted);
}

.notification-item.tone-warning {
  border-color: rgba(197, 154, 32, 0.35);
  background: rgba(255, 247, 223, 0.92);
}

.notification-item.tone-info {
  border-color: rgba(12, 74, 163, 0.18);
}

.notification-item.tone-info .notification-title {
  color: var(--blue-700);
}

.notification-item.tone-error {
  border-color: rgba(210, 73, 73, 0.28);
  background: rgba(255, 240, 240, 0.92);
}

.notification-item.tone-error .notification-title {
  color: #a02c2c;
}

.notification-item.tone-warning .notification-title {
  color: #8b6516;
}

.notification-item.tone-ready {
  border-color: rgba(17, 142, 29, 0.24);
  background: rgba(239, 249, 241, 0.94);
}

.notification-item.tone-ready .notification-title {
  color: var(--green-700);
}

.notification-item.tone-muted {
  border-color: rgba(91, 109, 126, 0.16);
  background: rgba(247, 249, 251, 0.96);
}

.notification-item.is-complete .notification-title,
.notification-item.tone-muted .notification-title {
  color: var(--muted);
  font-weight: 500;
}

.notification-item.is-complete p,
.notification-item.tone-muted p {
  color: rgba(91, 109, 126, 0.9);
}

.geo-map {
  width: 100%;
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(16, 32, 52, 0.08);
}

.camera-modal,
.preview-modal,
.app-dialog-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 26, 44, 0.6);
  overflow: auto;
}

.camera-sheet {
  width: min(760px, 100%);
  max-height: calc(100vh - 20px);
  display: grid;
  gap: 14px;
  overflow: auto;
}

.preview-sheet {
  width: min(980px, 100%);
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.app-dialog-modal {
  z-index: 42;
}

.app-dialog-sheet {
  width: min(640px, 100%);
  max-height: calc(100vh - 24px);
  display: grid;
  gap: 16px;
  overflow: auto;
}

.app-dialog-copy {
  margin-top: 0;
}

.app-dialog-form {
  display: grid;
  gap: 16px;
}

.app-dialog-fields {
  margin-top: 2px;
}

.app-dialog-field {
  min-width: 0;
}

.dialog-help {
  color: var(--muted);
  line-height: 1.5;
}

.app-dialog-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.primary-button.danger {
  background: linear-gradient(135deg, #b23131, #d24949);
}

.video-frame {
  position: relative;
  width: min(100%, 640px);
  margin: 0 auto;
  overflow: hidden;
  min-height: clamp(300px, 52vh, 430px);
  max-height: 60vh;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: #071a2c;
}

.camera-caption,
#cameraModalStatus {
  width: min(100%, 640px);
  margin: 0 auto;
}

#video,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#video {
  transform: scaleX(-1);
}

#overlay {
  pointer-events: none;
}

.face-guide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(48%, 280px);
  aspect-ratio: 0.78;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -52%);
  box-shadow:
    0 0 0 999px rgba(5, 20, 32, 0.22),
    inset 0 0 0 2px rgba(12, 74, 163, 0.3);
}

.face-guide.ready {
  border-color: rgba(19, 136, 110, 0.96);
  box-shadow:
    0 0 0 999px rgba(5, 20, 32, 0.16),
    inset 0 0 0 2px rgba(19, 136, 110, 0.4);
}

.camera-capture-fab {
  position: relative;
  min-width: 210px;
  min-height: 54px;
  padding: 14px 24px;
  border-radius: 999px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-700), var(--green-700));
  box-shadow: 0 16px 30px rgba(12, 74, 163, 0.28);
}

.camera-capture-fab:hover {
  transform: translateY(-1px);
}

.camera-actions {
  position: absolute;
  inset: auto 0 18px;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  z-index: 2;
}

.compact-box {
  margin-top: 12px;
}

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

.preview-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.preview-image,
.preview-empty {
  width: 100%;
  min-height: 260px;
  border-radius: 18px;
  background: rgba(16, 32, 52, 0.05);
  object-fit: cover;
}

.preview-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.multiline-prewrap {
  white-space: pre-wrap;
  line-height: 1.5;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(16, 32, 52, 0.08);
}

.hidden {
  display: none !important;
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .summary-grid.eight,
  .summary-grid.four,
  .summary-grid.six,
  .summary-grid,
  .grid-2,
  .detail-grid,
  .current-shift-grid,
  .preview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .summary-grid.eight,
  .summary-grid.four,
  .summary-grid.six,
  .summary-grid,
  .grid-2,
  .detail-grid,
  .current-shift-grid,
  .form-grid,
  .filter-grid,
  .preview-grid,
  .chart-bars,
  .overview-chart-layout {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .zoom-banner,
  .topbar,
  .topbar-actions,
  .section-head,
  .inline-actions,
  .section-nav,
  .topbar-brand {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > * {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1380px);
    padding-top: 18px;
  }

  .login-body {
    padding: 16px;
  }

  .login-hero,
  .login-panel,
  .topbar,
  .card,
  .camera-sheet,
  .preview-sheet {
    padding: 18px;
    border-radius: 22px;
  }

  .video-frame {
    min-height: 56vh;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
  }

  .data-table td {
    padding: 8px 0;
    border-top: none;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .data-table td[colspan] {
    display: block;
  }

  .data-table td[colspan]::before {
    display: none;
  }

  .camera-capture-fab {
    min-width: 170px;
    bottom: 12px;
  }
}

@media (max-width: 820px) and (pointer: coarse) {
  .app-shell {
    width: min(100% - 14px, 1380px);
    padding-top: 14px;
    padding-bottom: calc(114px + env(safe-area-inset-bottom));
  }

  .widget-scroll {
    padding-right: 3px;
  }

  .widget-scroll.three-cards {
    max-height: 334px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
  }

  .topbar-brand {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
  }

  .topbar-brand > div {
    min-width: 0;
  }

  .topbar .eyebrow,
  .topbar-subtext {
    display: none;
  }

  .topbar h1 {
    max-width: 100%;
    font-size: 1.02rem;
    line-height: 1.15;
  }

  .topbar-user-label {
    margin-top: 4px;
    padding: 5px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-logo.small {
    width: 38px;
    height: 38px;
  }

  .topbar-actions {
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex: 0 0 auto;
  }

  .topbar-actions > * {
    width: auto;
  }

  .topbar-actions .icon-label {
    min-width: 56px;
    min-height: 54px;
    padding: 7px 6px;
    gap: 3px;
    flex-direction: column;
    justify-content: center;
    border-radius: 14px;
  }

  .topbar-actions .icon-label span:last-child {
    display: block;
    max-width: 52px;
    font-size: 0.52rem;
    line-height: 1.05;
    text-align: center;
    color: rgba(16, 32, 52, 0.76);
  }

  .section-nav {
    display: none;
  }

  .mobile-panel-toolbar {
    position: fixed;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 18;
    width: min(calc(100% - 18px), 420px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(16, 32, 52, 0.08);
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
    box-shadow: 0 16px 32px rgba(9, 35, 64, 0.18);
    backdrop-filter: blur(14px);
  }

  .mobile-panel-toolbar.is-open .mobile-menu-toggle {
    background: linear-gradient(135deg, rgba(12, 74, 163, 0.96), rgba(17, 142, 29, 0.92));
    color: white;
  }

  .mobile-panel-toolbar.is-open .mobile-menu-toggle .mobile-menu-toggle-icon {
    background: rgba(255, 255, 255, 0.18);
  }

  .mobile-menu-panel {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(16, 32, 52, 0.08);
    box-shadow: 0 20px 40px rgba(9, 35, 64, 0.18);
    backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease,
      visibility 160ms ease;
  }

  .mobile-panel-toolbar.is-open .mobile-menu-panel {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-control select {
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .mobile-nav-control {
    padding: 2px;
  }

  .filter-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    gap: 12px;
  }

  .section-head .inline-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .section-head .inline-actions > * {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    justify-content: center;
  }

  .geo-map {
    min-height: 280px;
  }

  .scroll-target {
    scroll-margin-top: 138px;
  }

  .app-dialog-modal {
    align-items: end;
    padding: 12px;
  }

  .app-dialog-sheet {
    width: 100%;
    max-height: min(82vh, 720px);
    border-radius: 28px 28px 22px 22px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .app-dialog-actions > * {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}
