:root {
  --ink: #17211b;
  --muted: #66716a;
  --line: #d9dfd8;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --field: #f5f7f1;
  --soft: #f5f7f1;
  --green: #235d3a;
  --green-2: #2f7d4c;
  --gold: #b6852c;
  --red: #b43b3b;
  --shadow: 0 18px 48px rgba(25, 37, 28, 0.1);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

/* 2026-07-17 cinematic login hero */
.auth-page {
  background:
    radial-gradient(circle at 16% 14%, rgba(230, 167, 0, 0.16), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(23, 36, 192, 0.16), transparent 34%),
    linear-gradient(135deg, #eef4f8 0%, #f8fbff 46%, #eef2f7 100%);
}

.auth-shell {
  overflow: hidden;
  border: 1px solid rgba(158, 176, 196, 0.45);
  background: #fff;
  align-content: start;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #1724c0;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 32%),
    radial-gradient(circle at 24% 22%, rgba(230, 167, 0, 0.28), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.18), transparent 20%);
  animation: auth-glow 7s ease-in-out infinite alternate;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
  animation: auth-grid-drift 18s linear infinite;
}

.auth-visual {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  z-index: -1;
  opacity: 0.88;
  pointer-events: none;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center bottom;
  filter: saturate(1.12) contrast(1.04);
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1724c0 0%, rgba(23, 36, 192, 0.72) 28%, rgba(23, 36, 192, 0.08) 100%);
}

.auth-scan-line {
  position: absolute;
  left: -22%;
  top: 22%;
  width: 52%;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76), transparent);
  transform: rotate(-15deg);
  animation: auth-scan 4.8s ease-in-out infinite;
}

.auth-orbit {
  position: absolute;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #e6a700;
  box-shadow: 0 0 22px rgba(230, 167, 0, 0.75);
}

.auth-orbit-one {
  left: 18%;
  bottom: 26%;
  animation: auth-float-one 5.2s ease-in-out infinite;
}

.auth-orbit-two {
  right: 22%;
  bottom: 42%;
  animation: auth-float-two 6.4s ease-in-out infinite;
}

.auth-brand-panel .auth-mark,
.auth-brand-panel h1,
.auth-brand-panel p,
.auth-points {
  position: relative;
  z-index: 2;
}

.auth-card {
  position: relative;
  z-index: 2;
  border-color: rgba(196, 209, 223, 0.72);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #1724c0, #e6a700, #1724c0);
}

.auth-shell .site-footer {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 16px 16px;
  background: #fff;
}

@keyframes auth-glow {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.035);
  }
}

@keyframes auth-grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 84px 42px, 84px 42px;
  }
}

@keyframes auth-scan {
  0% {
    transform: translateX(0) rotate(-15deg);
    opacity: 0;
  }
  18%,
  62% {
    opacity: 0.75;
  }
  100% {
    transform: translateX(240%) rotate(-15deg);
    opacity: 0;
  }
}

@keyframes auth-float-one {
  50% {
    transform: translate3d(24px, -16px, 0);
  }
}

@keyframes auth-float-two {
  50% {
    transform: translate3d(-18px, 22px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-brand-panel::before,
  .auth-brand-panel::after,
  .auth-scan-line,
  .auth-orbit {
    animation: none;
  }
}

@media (min-width: 861px) {
  .auth-shell {
    width: min(1080px, calc(100% - 48px));
    min-height: 0;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
    grid-template-rows: auto auto;
  }

  .auth-brand-panel {
    min-height: 480px;
    padding: 74px 70px;
  }

  .auth-card {
    min-height: 480px;
  }

  .auth-brand-panel h1 {
    max-width: 560px;
    font-size: 52px;
  }

  .auth-brand-panel p {
    max-width: 620px;
    font-size: 18px;
  }

  .auth-shell .site-footer {
    border-top: 1px solid rgba(214, 224, 232, 0.64);
  }
}

@media (max-width: 860px) {
  .auth-brand-panel {
    background: #1724c0;
  }

  .auth-visual {
    height: 70%;
  }

  .auth-brand-panel h1 {
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  }

  .auth-shell .site-footer {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(35, 93, 58, 0.09), transparent 34%),
    linear-gradient(315deg, rgba(182, 133, 44, 0.13), transparent 40%),
    var(--paper);
}

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

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 54px;
}

.shell-wide {
  width: calc(100% - 48px);
  max-width: none;
}

.project-form-panel {
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-form-toggle {
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
}

.icon-toggle {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--green);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(25, 37, 28, 0.08);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.icon-toggle:hover {
  background: #fff;
  border-color: rgba(35, 93, 58, 0.3);
  box-shadow: 0 10px 22px rgba(25, 37, 28, 0.12);
  transform: translateY(-1px);
}

.icon-toggle:focus-visible {
  outline: 3px solid rgba(47, 125, 76, 0.18);
  outline-offset: 2px;
}

.chevron-up {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}


.project-form-toggle .primary {
  width: 100%;
}

.project-form-panel.expanded .project-form-toggle {
  display: none;
}

.project-form-fields {
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

.project-form-panel:not(.expanded) .project-form-fields {
  animation: slideUp 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-subpage {
  gap: 10px;
}

.brand-subpage .brand-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #153322);
  box-shadow: 0 10px 22px rgba(35, 93, 58, 0.25);
  font-weight: 800;
}

.back-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(35, 93, 58, 0.22);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(35, 93, 58, 0.08);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.back-button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.brand h1 {
  font-size: 34px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0;
}

.brand p,
.muted {
  color: var(--muted);
}

.brand p {
  margin: 4px 0 0;
  font-size: 14px;
}

.brand-subpage h1 {
  font-size: 26px;
  line-height: 1.2;
}

.brand-subpage p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.site-footer {
  margin-top: 28px;
  padding: 16px 0 4px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--green);
  text-decoration: underline;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.nav-greeting {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
  padding: 0 6px;
  white-space: nowrap;
}

.nav a,
.nav-button,
.ghost,
.primary,
.danger {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
}

.nav a,
.nav-button,
.ghost {
  color: var(--green);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.nav-button {
  cursor: pointer;
}

.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 20px rgba(35, 93, 58, 0.22);
}

.danger {
  color: #fff;
  background: var(--red);
}

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.panel,
.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.card {
  padding: 16px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 18px;
}

.grid {
  display: grid;
  gap: 12px;
}

.project-panel {
  height: 100%;
}

.fields {
  display: grid;
  gap: 14px;
}

.field label,
.label {
  display: block;
  font-size: 13px;
  color: #3e4a43;
  margin-bottom: 7px;
  font-weight: 800;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.label-row label {
  margin-bottom: 0;
}

.report-type-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-type-selector label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.report-type-selector input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.report-type-selector span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.report-type-selector input:checked + span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.report-type-selector input:focus-visible + span {
  outline: 3px solid rgba(23, 91, 54, 0.18);
  outline-offset: 1px;
}

.weather-refresh {
  min-height: 32px;
  padding-inline: 10px;
}

.voice-input-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding-inline: 10px;
}

.voice-input-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-input-button.listening {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.voice-input-button.listening svg {
  animation: voice-pulse 1.1s ease-in-out infinite;
}

.voice-input-button.unsupported {
  color: var(--muted);
}

.wechat-voice-tip {
  margin: -2px 0 2px;
  color: #7b8794;
  font-size: 13px;
  line-height: 1.5;
}

.wechat-voice-tip[hidden] {
  display: none !important;
}

@keyframes voice-pulse {
  50% {
    opacity: 0.45;
  }
}

.weather-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.temperature-field {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding-right: 10px;
}

.temperature-field input {
  border: 0;
  background: transparent;
  padding-right: 0;
}

.temperature-field span {
  color: var(--muted);
  font-weight: 800;
}

.weather-status {
  margin: 8px 0 0;
  line-height: 1.5;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  border-radius: 8px;
  padding: 12px;
  outline: none;
}

input[type="date"],
select {
  height: 48px;
  line-height: 1.2;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--green) 50%),
    linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 10px;
}

textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(47, 125, 76, 0.14);
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-list,
.status-list {
  display: grid;
  gap: 12px;
}

.project-item {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.project-item strong {
  font-size: 16px;
}

.mobile-project-list,
.mobile-diary-list {
  display: grid;
  gap: 10px;
}

.mobile-project-card,
.mobile-diary-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mobile-card-title {
  color: var(--green);
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.mobile-card-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mobile-card-stats,
.mobile-card-actions,
.mobile-diary-head,
.mobile-diary-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-card-stats span {
  color: var(--muted);
}

.mobile-card-stats b {
  color: var(--ink);
  font-size: 18px;
}

.mobile-diary-head strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
}

.mobile-diary-section {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.mobile-diary-section span {
  display: block;
  margin-bottom: 6px;
  color: #3e4a43;
  font-size: 13px;
  font-weight: 800;
}

.mobile-diary-section p {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.mobile-diary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-diary-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mobile-diary-grid b {
  display: block;
  font-size: 22px;
}

.mobile-diary-grid span {
  color: var(--muted);
  font-size: 13px;
}

.compact-info-grid b {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  word-break: break-word;
}

.compact-info-grid span {
  margin-top: 4px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.project-table th,
.project-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.project-table th {
  color: #3e4a43;
  background: #f0f4ec;
  font-weight: 800;
  white-space: nowrap;
}

.project-table tr:last-child td {
  border-bottom: 0;
}

.table-link,
.back-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.table-link:hover,
.back-link:hover {
  text-decoration: underline;
}

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

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
}

.copy-line {
  min-width: 0;
  padding: 10px;
  background: var(--field);
  border-radius: 8px;
  color: var(--muted);
  word-break: break-all;
  font-size: 13px;
}

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

.detail-actions-only {
  justify-content: flex-start;
}

.detail-head h2 {
  margin: 8px 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

.diary-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.diary-table {
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
  table-layout: fixed;
}

.diary-table th,
.diary-table td {
  padding: 8px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.diary-table th {
  color: #3e4a43;
  background: #f0f4ec;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.diary-table th:last-child,
.diary-table td:last-child {
  border-right: 0;
}

.diary-table tr:last-child td {
  border-bottom: 0;
}

.diary-table th:nth-child(1),
.diary-table td:nth-child(1) {
  width: 98px;
}

.diary-table th:nth-child(2),
.diary-table td:nth-child(2) {
  width: 52px;
}

.diary-table th:nth-child(3),
.diary-table td:nth-child(3) {
  width: 62px;
}

.diary-table th:nth-child(4),
.diary-table td:nth-child(4) {
  width: 62px;
}

.diary-table th:nth-child(5),
.diary-table td:nth-child(5) {
  width: 190px;
}

.diary-table th:nth-child(6),
.diary-table td:nth-child(6) {
  width: 190px;
}

.diary-table th:nth-child(7),
.diary-table td:nth-child(7) {
  width: 68px;
}

.diary-table th:nth-child(8),
.diary-table td:nth-child(8) {
  width: 68px;
}

.diary-table th:nth-child(9),
.diary-table td:nth-child(9) {
  width: 130px;
}

.diary-table th:nth-child(10),
.diary-table td:nth-child(10) {
  width: 128px;
}

.diary-table th:nth-child(11),
.diary-table td:nth-child(11) {
  width: 140px;
}

.diary-table th:nth-child(12),
.diary-table td:nth-child(12) {
  width: 82px;
}

.diary-table th:nth-child(13),
.diary-table td:nth-child(13) {
  width: 140px;
}

.diary-table th:nth-child(14),
.diary-table td:nth-child(14) {
  width: 132px;
}

.diary-text {
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.muted-cell {
  color: #526058;
}

.nowrap {
  white-space: nowrap;
}

.center {
  text-align: center !important;
}

.diary-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.submission-delete {
  min-height: 26px;
  padding: 0 6px;
  border-radius: 4px;
  color: #8a94a5;
  background: transparent;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
}

.submission-delete:hover {
  color: var(--red);
  background: rgba(180, 59, 59, 0.04);
  border-color: rgba(180, 59, 59, 0.12);
  opacity: 1;
}

.photo-count-cell {
  position: relative;
  display: inline-block;
}

.photo-popover-template {
  display: none;
}

.photo-count-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--green);
  background: rgba(35, 93, 58, 0.08);
  border: 1px solid rgba(35, 93, 58, 0.16);
  font-weight: 800;
  white-space: nowrap;
}

.photo-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 49;
  width: 300px;
  max-height: 310px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 28, 21, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.photo-popover.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.photo-preview-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 9px;
  align-items: center;
  width: 100%;
  padding: 6px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  text-align: left;
}

.photo-preview-item:hover {
  border-color: rgba(35, 93, 58, 0.28);
  background: #fff;
}

.photo-preview-item img {
  grid-row: span 2;
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
}

.photo-preview-item span {
  font-weight: 800;
}

.photo-preview-item small {
  color: var(--muted);
}

.image-modal-dialog {
  width: min(1100px, calc(100% - 24px));
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(17, 28, 21, 0.28);
  padding: 18px;
}

.image-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #101812;
  overflow: hidden;
}

.image-preview {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.12s ease;
}

.image-preview.is-loading {
  opacity: 0.42;
}

.image-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 56px;
  min-height: 56px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(17, 28, 21, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.image-nav:hover {
  background: rgba(17, 28, 21, 0.72);
}

.image-nav:disabled {
  opacity: 0.32;
  cursor: default;
}

.image-nav-prev {
  left: 12px;
}

.image-nav-next {
  right: 12px;
}

.danger-zone {
  border-color: rgba(180, 59, 59, 0.28);
}

.danger-zone .section-title {
  margin-bottom: 8px;
}

.confirm-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.delete-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 28, 21, 0.36);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(17, 28, 21, 0.28);
  padding: 18px;
}

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

.modal-head h2 {
  margin: 0 0 6px;
}

.modal-head p {
  margin: 0;
}

.icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.export-options label {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  font-weight: 800;
  color: #3e4a43;
}

.export-options input {
  width: auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.stat {
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  min-width: 0;
  text-align: left;
}

.stat-button {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stat-button:hover {
  border-color: rgba(180, 59, 59, 0.28);
  box-shadow: 0 8px 20px rgba(180, 59, 59, 0.08);
  transform: translateY(-1px);
}

.stat b {
  display: block;
  font-size: 24px;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-alert b {
  color: var(--red);
}

.stat span {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}

.status-note {
  margin: 0;
  line-height: 1.5;
}

.project-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.project-owner-filter {
  min-width: 150px;
}

.project-owner-filter select {
  height: 34px;
  min-height: 34px;
  padding-block: 5px;
  font-size: 13px;
  font-weight: 700;
}

.project-filter-actions .active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.activity-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.compact-title {
  margin-bottom: 10px;
}

.activity-toggle {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.activity-toggle:hover {
  border-color: rgba(35, 93, 58, 0.28);
  background: var(--soft);
  box-shadow: 0 8px 22px rgba(19, 48, 34, 0.07);
}

.activity-toggle-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.toggle-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.activity-toggle.expanded .toggle-chevron {
  transform: rotate(225deg);
}

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

.activity-panel[hidden] {
  display: none;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #fff;
  text-decoration: none;
  font-weight: 900;
}

.activity-more:hover {
  background: var(--soft);
  border-color: rgba(35, 93, 58, 0.28);
}

.activity-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  margin-top: 8px;
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-title strong {
  font-size: 14px;
}

.activity-item p {
  margin: 5px 0 4px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.activity-item time {
  color: var(--muted);
  font-size: 12px;
}

.activity-page {
  display: grid;
  gap: 14px;
}

.activity-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.activity-list-view {
  min-height: 180px;
}

.activity-table {
  min-width: 980px;
}

.activity-card-list {
  display: grid;
  gap: 10px;
}

.activity-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

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

.activity-card p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.activity-card time {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 92px 130px 1fr;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge.ok {
  background: rgba(47, 125, 76, 0.13);
  color: var(--green);
}

.badge.wait {
  background: rgba(180, 59, 59, 0.12);
  color: var(--red);
}

.mobile-form {
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

.form-hero {
  background: linear-gradient(135deg, #173a27, #2c6b43);
  color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.form-hero h1 {
  margin: 0 0 8px;
  font-size: 36px;
  letter-spacing: 0;
}

.form-hero p {
  margin: 4px 0;
  opacity: 0.86;
}

.worker-identity-notice {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
  padding: 13px 16px;
  color: #7d3232;
  background: #fff5f4;
  border: 1px solid #ebc9c7;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.65;
}

.worker-identity-notice strong {
  color: var(--red);
  font-weight: 700;
}

.fill-type-badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 8px;
  color: var(--green);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.text-diary-form textarea {
  resize: vertical;
}

.choice-grid,
.equipment-grid {
  display: grid;
  gap: 9px;
}

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

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

.choice,
.equipment {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice input,
.equipment input {
  width: auto;
}

.upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.upload-button {
  position: relative;
  overflow: hidden;
  min-height: 52px;
  border-radius: 8px;
  border: 1px dashed var(--green-2);
  color: var(--green);
  background: rgba(47, 125, 76, 0.08);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

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

.photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8ece5;
}

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

.photo button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.photo-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.photo-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.photo-slot-preview {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: var(--field);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}

.photo-slot-preview span {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: var(--green);
}

.photo-slot-preview small {
  margin-top: -18px;
  font-size: 12px;
}

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

.photo-slot-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.slot-upload-button,
.slot-remove-button {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.slot-upload-button {
  position: relative;
  overflow: hidden;
}

.slot-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.slot-remove-button {
  grid-column: 1 / -1;
  color: var(--red);
}

.photo-slot.filled .photo-slot-preview {
  border-style: solid;
  background: #fff;
}

.submit-bar {
  position: sticky;
  bottom: 0;
  padding: 10px 0 env(safe-area-inset-bottom);
  background: linear-gradient(180deg, transparent, var(--paper) 28%);
}

.submit-bar .primary {
  width: 100%;
  min-height: 52px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: fit-content;
  max-width: min(560px, calc(100vw - 32px));
  background: #17211b;
  color: #fff;
  border-radius: 8px;
  padding: 12px 15px;
  box-shadow: var(--shadow);
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
  z-index: 2147483647;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-mark {
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.auth-inline {
  width: min(520px, 100%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.auth-tabs button {
  min-height: 38px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.auth-tabs button.active {
  color: var(--green);
  background: #fff;
  box-shadow: 0 6px 14px rgba(25, 37, 28, 0.08);
}

.auth-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.account-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-projects {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.account-projects ul,
.account-transfer-preview ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.account-transfer-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 12px;
  margin: 12px 0;
}

.account-transfer-preview p {
  margin: 8px 0 0;
}

.account-row strong {
  display: inline-block;
  margin-right: 8px;
}

.account-row p {
  margin: 6px 0 0;
}

.account-actions,
.reset-form {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.reset-form input {
  width: 150px;
  height: 34px;
  padding: 6px 9px;
}

.submission {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.submission img {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
}

.submission-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 22px, 720px);
    padding-top: 14px;
  }

  .auth-page {
    align-items: start;
    padding: 14px;
  }

  .auth-card {
    width: 100%;
    padding: 20px;
  }

  .auth-card h1 {
    font-size: 26px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand h1 {
    font-size: 26px;
    line-height: 1.18;
  }

  .brand p {
    font-size: 13px;
    line-height: 1.45;
  }

  .brand-subpage .brand-copy {
    gap: 8px;
  }

  .brand-subpage h1 {
    font-size: 22px;
  }

  .brand-subpage p {
    margin: 0;
  }

  .nav {
    width: 100%;
    justify-content: stretch;
  }

  .nav a,
  .nav-button {
    flex: 1;
    min-height: 40px;
    padding-inline: 10px;
  }

  .project-actions,
  .mobile-card-actions,
  .diary-actions {
    width: 100%;
  }

  .project-actions > *,
  .mobile-card-actions > *,
  .diary-actions > * {
    flex: 1;
    min-width: 0;
  }

  .nav-greeting {
    width: 100%;
    padding: 0;
  }

  .layout,
  .account-layout,
  .sidebar,
  .row,
  .confirm-name,
  .delete-form,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .shell.shell-wide {
    width: calc(100% - 22px);
    max-width: none;
  }

  .sidebar {
    grid-template-rows: auto;
  }

  .detail-head {
    display: grid;
  }

  .photo-popover {
    width: min(270px, calc(100vw - 40px));
  }

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

  .status-row {
    grid-template-columns: 1fr;
  }

  .activity-filters {
    grid-template-columns: 1fr;
  }

  .account-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title input[type="date"] {
    width: 100%;
  }

  .account-actions,
  .reset-form {
    justify-content: stretch;
  }

  .reset-form input,
  .reset-form button {
    flex: 1;
  }

  .choice-grid,
  .equipment-grid,
  .weather-input-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 420px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-actions {
    grid-template-columns: 1fr;
  }

  .export-options {
    grid-template-columns: 1fr;
  }
}

/* 2026-06 UI refresh: professional construction admin surface */
:root {
  --ink: #14201a;
  --muted: #64716a;
  --line: #dce3dc;
  --paper: #f7f7f2;
  --panel: #ffffff;
  --field: #f8faf6;
  --soft: #eef4ed;
  --green: #185b35;
  --green-2: #2d7a4d;
  --gold: #a06d1f;
  --red: #b23838;
  --blue: #375a7f;
  --shadow: 0 12px 28px rgba(18, 32, 24, 0.08);
  --shadow-strong: 0 22px 48px rgba(18, 32, 24, 0.14);
}

html {
  min-width: 0;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(24, 91, 53, 0.055), rgba(247, 247, 242, 0) 280px),
    repeating-linear-gradient(90deg, rgba(20, 32, 26, 0.018) 0, rgba(20, 32, 26, 0.018) 1px, transparent 1px, transparent 80px),
    var(--paper);
  font-size: 15px;
  line-height: 1.5;
}

button,
a,
input,
select,
textarea {
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(45, 122, 77, 0.18);
  outline-offset: 2px;
}

.shell {
  width: min(1360px, calc(100% - 40px));
  padding: 22px 0 48px;
}

.shell-wide {
  width: calc(100% - 36px);
}

.topbar {
  min-height: 58px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(220, 227, 220, 0.9);
}

.brand {
  gap: 14px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand h1 {
  font-size: 31px;
  line-height: 1.16;
  font-weight: 900;
}

.brand p {
  margin: 0;
  font-size: 14px;
}

.brand-subpage h1 {
  font-size: 24px;
}

.brand-subpage .brand-copy {
  align-items: center;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #164b2f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 22px rgba(24, 91, 53, 0.22);
}

.back-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  background: #fff;
}

.nav {
  gap: 10px;
}

.nav-greeting {
  padding: 0 8px;
  color: #405149;
}

.nav a,
.nav-button,
.ghost,
.primary,
.danger {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
}

.ghost,
.nav a,
.nav-button {
  background: #fff;
  border-color: #d7ded6;
}

.ghost:hover,
.nav a:hover,
.nav-button:hover {
  background: #f3f8f2;
  border-color: rgba(24, 91, 53, 0.28);
}

.primary {
  background: linear-gradient(180deg, #216c40, #185b35);
  box-shadow: 0 10px 18px rgba(24, 91, 53, 0.18);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(24, 91, 53, 0.22);
}

.danger {
  background: #b23838;
  box-shadow: 0 10px 18px rgba(178, 56, 56, 0.16);
}

.layout {
  grid-template-columns: 376px minmax(0, 1fr);
  gap: 16px;
}

.panel,
.card,
.auth-card,
.mobile-project-card,
.mobile-diary-card,
.project-item,
.activity-card,
.account-row,
.status-row {
  border-color: rgba(196, 207, 196, 0.92);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.section-title {
  margin-bottom: 13px;
}

.section-title h2,
.section-title h3 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 900;
}

.fields {
  gap: 13px;
}

.field label,
.label {
  color: #34463c;
  font-size: 13px;
  letter-spacing: 0;
}

input,
select,
textarea {
  border-color: #d8e0d7;
  background: #fbfcf8;
  border-radius: 8px;
  padding: 11px 12px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(24, 91, 53, 0.24);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 122, 77, 0.13);
}

textarea {
  min-height: 108px;
}

.table-wrap,
.diary-table-wrap {
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.project-table th,
.diary-table th {
  background: #edf3eb;
  color: #34463c;
  font-size: 13px;
  font-weight: 900;
}

.project-table td,
.diary-table td {
  background: #fff;
}

.project-table tbody tr:hover td,
.diary-table tbody tr:hover td {
  background: #fbfcf8;
}

.table-link {
  color: #145c34;
}

.badge {
  min-height: 26px;
  padding: 3px 9px;
}

.badge.ok {
  background: #e3f1e8;
  color: #146036;
}

.badge.wait {
  background: #f8e7e7;
  color: #aa3232;
}

.stats {
  gap: 10px;
}

.stat {
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fbfcf8);
}

.stat b {
  font-size: 30px;
}

.stat span {
  font-size: 13px;
  font-weight: 800;
}

.activity-block {
  border-top-color: rgba(220, 227, 220, 0.9);
}

.activity-toggle,
.activity-more {
  background: linear-gradient(180deg, #fff, #fbfcf8);
}

.activity-item {
  padding: 11px 0;
}

.activity-dot {
  box-shadow: 0 0 0 4px rgba(24, 91, 53, 0.1);
}

.modal-backdrop {
  background: rgba(14, 25, 19, 0.44);
  backdrop-filter: blur(3px);
}

.modal-dialog,
.image-modal-dialog {
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
}

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

.auth-page {
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(180deg, rgba(24, 91, 53, 0.08), transparent 38%),
    var(--paper);
}

.auth-shell {
  width: min(980px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  border: 1px solid rgba(196, 207, 196, 0.92);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-strong);
}

.auth-brand-panel {
  min-width: 0;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(24, 91, 53, 0.94), rgba(18, 42, 29, 0.98)),
    #164b2f;
  color: #fff;
}

.auth-brand-panel .auth-mark {
  margin: 0 0 34px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-brand-panel h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
}

.auth-brand-panel p {
  max-width: 420px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.auth-points {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.auth-points span {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  font-size: 13px;
}

.auth-card {
  width: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  margin-bottom: 22px;
}

.auth-tabs button {
  min-height: 42px;
}

.account-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.account-row {
  padding: 14px;
}

.mobile-form {
  width: min(760px, calc(100% - 24px));
}

.form-hero {
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, #164b2f, #226b42);
  box-shadow: var(--shadow-strong);
}

.form-hero h1 {
  font-size: 30px;
  line-height: 1.18;
}

.form-hero p {
  line-height: 1.55;
}

.choice,
.equipment,
.photo-slot {
  background: #fff;
}

.choice,
.equipment {
  min-height: 46px;
}

.photo-slot {
  padding: 9px;
}

.photo-slot-preview {
  background: #f7faf4;
}

.slot-upload-button:hover,
.slot-remove-button:hover {
  background: #f3f8f2;
  border-color: rgba(24, 91, 53, 0.28);
}

.submit-bar {
  background: linear-gradient(180deg, transparent, rgba(247, 247, 242, 0.96) 30%);
}

.toast {
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
}

@media (min-width: 861px) {
  .project-panel {
    min-height: 520px;
  }

  .activity-toggle {
    display: none;
  }

  .activity-panel[hidden] {
    display: grid !important;
  }
}

@media (max-width: 860px) {
  body {
    font-size: 14px;
  }

  .shell,
  .shell.shell-wide {
    width: calc(100% - 20px);
    padding: 12px 0 32px;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .brand {
    width: 100%;
  }

  .brand h1 {
    font-size: 24px;
  }

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

  .brand-subpage .brand-copy {
    display: grid;
    gap: 2px;
  }

  .nav {
    gap: 8px;
  }

  .nav a,
  .nav-button {
    min-height: 38px;
  }

  .layout,
  .account-layout {
    gap: 12px;
  }

  .panel {
    padding: 14px;
  }

  .section-title {
    gap: 8px;
  }

  .project-filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  .project-filter-actions > * {
    flex: 1;
  }

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

  .stat {
    padding: 12px;
  }

  .stat b {
    font-size: 28px;
  }

  .auth-page {
    display: block;
    min-height: 100vh;
    padding: 12px;
  }

  .auth-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: 24px 20px;
  }

  .auth-brand-panel .auth-mark {
    margin-bottom: 18px;
  }

  .auth-brand-panel h1 {
    font-size: 28px;
  }

  .auth-points {
    margin-top: 18px;
  }

  .auth-card {
    padding: 20px;
  }

  .mobile-form {
    width: calc(100% - 18px);
    padding: 10px 0 34px;
  }

  .form-hero {
    padding: 18px;
  }

  .form-hero h1 {
    font-size: 25px;
  }

  input[type="date"],
  select {
    height: 46px;
  }
}

@media (max-width: 420px) {
  .brand h1 {
    font-size: 22px;
  }

  .mark {
    width: 40px;
    height: 40px;
  }

  .auth-brand-panel h1 {
    font-size: 25px;
  }

  .auth-brand-panel,
  .auth-card {
    padding: 18px;
  }

  .photo-slot-grid {
    gap: 8px;
  }

  .slot-upload-button,
  .slot-remove-button {
    min-height: 36px;
  }
}

/* 2026-06-17 concise professional pass */
:root {
  --ink: #15211b;
  --muted: #5f6b64;
  --line: #dfe5de;
  --paper: #f6f7f4;
  --field: #fafbf8;
  --soft: #f0f4ef;
  --green: #175b36;
  --green-2: #2b7650;
  --red: #ad3737;
  --shadow: 0 1px 2px rgba(20, 32, 26, 0.05);
  --shadow-strong: 0 12px 28px rgba(20, 32, 26, 0.12);
}

body {
  background: var(--paper);
}

button,
a,
input,
select,
textarea {
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.shell {
  width: min(1400px, calc(100% - 32px));
  padding-top: 18px;
}

.shell-wide {
  width: calc(100% - 28px);
}

.topbar {
  min-height: 50px;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.brand h1 {
  font-size: 28px;
}

.brand-subpage h1 {
  font-size: 23px;
}

.brand p,
.brand-subpage p {
  color: #66736b;
}

.mark {
  width: 40px;
  height: 40px;
  background: #175b36;
  box-shadow: none;
}

.back-button {
  box-shadow: none;
}

.nav a,
.nav-button,
.ghost,
.primary,
.danger {
  min-height: 38px;
  padding: 0 13px;
  box-shadow: none;
}

.primary,
.primary:hover {
  background: #175b36;
  box-shadow: none;
  transform: none;
}

.danger {
  background: #ad3737;
  box-shadow: none;
}

.ghost,
.nav a,
.nav-button {
  background: #fff;
}

.panel,
.card,
.auth-card,
.mobile-project-card,
.mobile-diary-card,
.project-item,
.activity-card,
.account-row,
.status-row,
.stat {
  background: #fff;
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.layout {
  grid-template-columns: 352px minmax(0, 1fr);
  gap: 14px;
}

.section-title {
  margin-bottom: 10px;
}

.section-title h2,
.section-title h3 {
  font-size: 17px;
}

input,
select,
textarea {
  background: #fff;
  padding: 10px 11px;
}

input[type="date"],
select {
  height: 44px;
}

textarea {
  min-height: 96px;
}

.project-table th,
.project-table td {
  padding: 10px 10px;
}

.diary-table th,
.diary-table td {
  padding: 7px 7px;
}

.project-table th,
.diary-table th {
  background: #f1f5ef;
}

.stats {
  margin-bottom: 12px;
}

.stat {
  padding: 12px;
}

.stat b {
  font-size: 26px;
}

.activity-toggle,
.activity-more {
  background: #fff;
}

.activity-dot {
  box-shadow: none;
}

.modal-backdrop {
  background: rgba(16, 24, 19, 0.38);
  backdrop-filter: none;
}

.modal-dialog,
.image-modal-dialog {
  box-shadow: var(--shadow-strong);
}

.auth-page {
  background: var(--paper);
}

.auth-shell {
  width: min(920px, 100%);
  min-height: 500px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  box-shadow: var(--shadow-strong);
}

.auth-brand-panel {
  padding: 36px;
  background: #f1f5ef;
  color: var(--ink);
  border-right: 1px solid var(--line);
}

.auth-brand-panel .auth-mark {
  background: #175b36;
  color: #fff;
  border: 0;
}

.auth-brand-panel h1 {
  font-size: 30px;
}

.auth-brand-panel p {
  color: var(--muted);
}

.auth-points span {
  color: #234436;
  background: #fff;
  border-color: var(--line);
}

.auth-card {
  padding: 36px;
}

.form-hero {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  box-shadow: var(--shadow);
}

.form-hero h1 {
  font-size: 27px;
}

.form-hero p {
  color: var(--muted);
  opacity: 1;
}

.submit-bar {
  background: linear-gradient(180deg, transparent, rgba(246, 247, 244, 0.98) 36%);
}

.toast {
  box-shadow: var(--shadow-strong);
}

.ghost.voice-input-button.listening,
.ghost.voice-input-button.listening:hover,
.ghost.voice-input-button.listening:active,
.ghost.voice-input-button.listening:focus-visible {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(173, 55, 55, 0.14);
}

@media (max-width: 860px) {
  .shell,
  .shell.shell-wide {
    width: calc(100% - 18px);
    padding-top: 10px;
  }

  .brand h1 {
    font-size: 23px;
  }

  .layout {
    gap: 10px;
  }

  .panel {
    padding: 13px;
  }

  .auth-brand-panel,
  .auth-card {
    padding: 18px;
  }

  .auth-brand-panel h1 {
    font-size: 25px;
  }

  .form-hero {
    padding: 16px;
  }
}

/* 2026-06-21 construction industry blue theme */
:root {
  --ink: #1b2733;
  --muted: #65727e;
  --line: #d6e0e8;
  --paper: #f3f6f8;
  --panel: #ffffff;
  --field: #f7f9fb;
  --soft: #eef0fc;
  --green: #1724c0;
  --green-2: #3447dc;
  --blue: #1724c0;
  --gold: #e6a700;
  --safety: #e6a700;
  --red: #b43a3a;
  --shadow: 0 2px 8px rgba(27, 58, 82, 0.07);
  --shadow-strong: 0 16px 36px rgba(27, 58, 82, 0.16);
  font-family: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

::selection {
  color: #fff;
  background: #1724c0;
}

body,
.auth-page {
  color: var(--ink);
  background: var(--paper);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.icon-toggle:focus-visible {
  outline-color: rgba(23, 36, 192, 0.24);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(23, 36, 192, 0.13);
}

.mark,
.auth-brand-panel .auth-mark {
  color: #fff;
  background: #1724c0;
  border: 0;
  box-shadow: inset 0 -3px 0 var(--safety);
}

.back-button,
.table-link,
.back-link,
.photo-count-button,
.nav a,
.nav-button,
.ghost {
  color: #1724c0;
}

.back-button {
  border-color: rgba(23, 36, 192, 0.22);
}

.nav-greeting,
.brand p,
.brand-subpage p {
  color: #63717d;
}

.ghost,
.nav a,
.nav-button {
  background: #fff;
  border-color: #d3dee7;
}

.ghost:hover,
.nav a:hover,
.nav-button:hover,
.slot-upload-button:hover,
.slot-remove-button:hover {
  color: #111b91;
  background: #f0f1fd;
  border-color: rgba(23, 36, 192, 0.32);
}

.primary,
.primary:hover,
.project-filter-actions .active,
.report-type-selector input:checked + span {
  color: #fff;
  background: #1724c0;
  border-color: #1724c0;
  box-shadow: none;
}

.primary:hover,
.project-filter-actions .active:hover {
  background: #111b91;
  border-color: #111b91;
}

.icon-toggle:hover {
  border-color: rgba(23, 36, 192, 0.32);
  box-shadow: 0 6px 16px rgba(27, 58, 82, 0.1);
}

.panel,
.card,
.auth-card,
.mobile-project-card,
.mobile-diary-card,
.project-item,
.activity-card,
.account-row,
.status-row,
.stat {
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.project-table th,
.diary-table th {
  color: #222d63;
  background: #eef0fc;
  border-color: #d7daf4;
}

.project-table td,
.diary-table td {
  border-color: #e0e7ed;
}

.badge.ok {
  color: #1724c0;
  background: #e9ebfc;
}

.activity-dot {
  background: #1724c0;
  box-shadow: 0 0 0 4px rgba(23, 36, 192, 0.1);
}

.photo-count-button {
  background: #eef0fc;
  border-color: #d7daf4;
}

.auth-shell {
  border-color: #d0d4ef;
  box-shadow: var(--shadow-strong);
}

.auth-brand-panel {
  color: #fff;
  background: #1724c0;
  border-top: 4px solid var(--safety);
  border-right-color: #111b91;
}

.auth-brand-panel p {
  color: rgba(255, 255, 255, 0.76);
}

.auth-points span {
  color: #eaf4fb;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-tabs button.active {
  color: #1724c0;
}

.form-hero {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  border-left-color: #1724c0;
}

.form-hero p {
  color: var(--muted);
}

.fill-type-badge {
  color: #1724c0;
  background: #eef0fc;
  border-color: #d7daf4;
}

.photo-slot-preview,
.report-type-selector,
.copy-line {
  background: #f3f7fa;
}

.submit-bar {
  background: linear-gradient(180deg, transparent, rgba(243, 246, 248, 0.98) 36%);
}

.field label,
.label {
  color: #354653;
}

.modal-backdrop {
  background: rgba(18, 38, 55, 0.42);
}

@media (max-width: 860px) {
  .auth-page {
    display: block;
    min-height: 100svh;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .auth-shell {
    width: min(560px, 100%);
    min-height: 0;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 8px;
  }

  .auth-brand-panel {
    display: block;
    padding: 22px 20px 20px;
    border-right: 0;
    border-bottom: 1px solid #111b91;
  }

  .auth-brand-panel .auth-mark {
    width: 38px;
    height: 38px;
    margin: 0 0 14px;
  }

  .auth-brand-panel h1 {
    font-size: 27px;
    line-height: 1.2;
  }

  .auth-brand-panel p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
  }

  .auth-points {
    gap: 6px;
    margin-top: 14px;
  }

  .auth-points span {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .auth-card {
    min-width: 0;
    padding: 22px 20px 24px;
  }

  .auth-tabs {
    margin-bottom: 18px;
  }

  .auth-card input,
  .auth-card button[type="submit"] {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .auth-page {
    padding-inline: 8px;
  }

  .auth-shell {
    border-radius: 6px;
  }

  .auth-brand-panel {
    padding: 18px 16px 17px;
  }

  .auth-brand-panel h1 {
    font-size: 24px;
  }

  .auth-card {
    padding: 18px 16px 22px;
  }

  .auth-card input {
    min-height: 46px;
  }
}

/* 2026-06-22 mobile layout audit */
@media (max-width: 860px) {
  .layout,
  .account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 12px;
  }

  .layout > *,
  .account-layout > *,
  .sidebar,
  .grid,
  .project-panel,
  .account-list {
    min-width: 0;
    width: 100%;
  }

  .topbar .brand {
    width: 100%;
    min-width: 0;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-subpage h1 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-greeting {
    grid-column: 1 / -1;
  }

  .nav a,
  .nav-button {
    width: 100%;
  }

  .project-form-panel:not(.expanded) {
    min-height: 0;
  }

  .project-form-toggle .primary {
    width: 100%;
  }

  .project-panel .section-title {
    gap: 10px;
  }

  .project-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .mobile-project-list,
  .activity-card-list {
    width: 100%;
  }

  .account-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .account-actions,
  .reset-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .reset-form input {
    width: 100%;
  }

  .detail-actions-only,
  .detail-actions-only .project-actions {
    width: 100%;
  }

  .detail-actions-only .project-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .detail-actions-only .project-actions > * {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    line-height: 1.35;
    white-space: normal;
  }

  .detail-actions-only .project-actions .danger:last-child {
    grid-column: 1 / -1;
  }

  .equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .equipment {
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
  }

  .activity-filters {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .shell,
  .shell.shell-wide {
    width: calc(100% - 16px);
  }

  .back-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .brand-subpage {
    gap: 10px;
  }

  .brand-subpage h1 {
    font-size: 19px;
  }

  .panel {
    padding: 12px;
  }

  .account-actions,
  .reset-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 2026-06-22 mobile home density pass */
@media (max-width: 860px) {
  .layout > .grid {
    grid-row: 1;
  }

  .layout > .sidebar {
    grid-row: 2;
  }

  .project-panel .section-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    margin-bottom: 10px;
  }

  .project-panel .section-title > div:first-child .muted {
    display: none;
  }

  .project-filter-actions {
    justify-self: end;
    width: min(220px, 100%);
    gap: 6px;
  }

  .project-list-head.has-owner-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-list-head.has-owner-filter .project-filter-actions {
    justify-self: stretch;
    width: 100%;
  }

  .project-owner-filter {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .project-filter-actions .compact {
    min-height: 34px;
    padding-inline: 8px;
  }

  .mobile-project-list {
    gap: 8px;
  }

  .mobile-project-card {
    gap: 6px;
    padding: 10px;
  }

  .mobile-card-title {
    font-size: 16px;
    line-height: 1.35;
  }

  .mobile-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  .mobile-card-heading .mobile-card-title {
    min-width: 0;
  }

  .mobile-card-heading .badge {
    flex: 0 0 auto;
  }

  .mobile-card-meta {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-project-card .badge {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 11px;
  }

  .mobile-card-stats {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    font-size: 12px;
  }

  .mobile-card-stats > :nth-child(2) {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-card-stats b {
    font-size: 16px;
  }

  .mobile-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-card-actions > * {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .activity-block {
    gap: 6px;
    padding-top: 10px;
  }

  .activity-toggle {
    min-height: 34px;
    padding: 5px 9px;
    gap: 8px;
    font-size: 13px;
  }

  .activity-toggle-meta {
    font-size: 11px;
  }

  .toggle-chevron {
    width: 7px;
    height: 7px;
  }
}

@media (max-width: 360px) {
  .project-panel .section-title {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-filter-actions {
    justify-self: stretch;
    width: 100%;
  }
}

/* 2026-06-23 boundary-focused mobile authentication */
@media (max-width: 860px) {
  .auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    background: #fff;
    overflow-x: hidden;
  }

  .auth-shell {
    --auth-mobile-hero-height: clamp(320px, 40svh, 430px);
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    grid-template-rows: var(--auth-mobile-hero-height) minmax(calc(100svh - var(--auth-mobile-hero-height)), auto);
    align-content: start;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-brand-panel {
    display: flex;
    flex-direction: column;
    min-height: var(--auth-mobile-hero-height);
    padding: max(24px, env(safe-area-inset-top)) clamp(22px, 7vw, 36px) clamp(52px, 8svh, 78px);
    justify-content: flex-end;
    border-top: 0;
    border-radius: 0;
  }

  .auth-card {
    min-height: calc(100svh - var(--auth-mobile-hero-height));
    justify-content: flex-start;
    padding: clamp(34px, 6svh, 56px) clamp(22px, 7vw, 36px) max(28px, env(safe-area-inset-bottom));
    background: #fff;
  }

  .auth-tabs {
    margin-top: 0;
  }
}

@media (max-width: 420px) {
  .auth-shell {
    --auth-mobile-hero-height: clamp(300px, 40svh, 360px);
  }

  .auth-brand-panel {
    padding-bottom: clamp(42px, 7svh, 62px);
  }

  .auth-card {
    padding-top: clamp(28px, 5svh, 42px);
  }
}

/* 2026-06-23 compact mobile header actions */
@media (max-width: 860px) {
  .topbar .nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    gap: 12px;
    overflow: hidden;
  }

  .topbar .nav-greeting {
    grid-column: auto;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .nav a,
  .topbar .nav-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 20px;
    padding: 0;
    color: #6f7c87;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    box-shadow: none;
  }

  .topbar .nav a:hover,
  .topbar .nav-button:hover {
    color: var(--green);
    background: transparent;
    border-color: transparent;
  }
}

/* 2026-06-24 compact project detail actions */
@media (max-width: 860px) {
  .detail-actions-only .project-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .detail-actions-only .project-actions > * {
    min-height: 38px;
    padding: 7px 6px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .detail-actions-only .project-actions .detail-action-copy {
    grid-column: span 2;
    color: #fff;
    background: var(--green);
    border-color: var(--green);
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(23, 36, 192, 0.16);
  }

  .detail-actions-only .project-actions .detail-action-export {
    grid-column: span 2;
  }

  .detail-actions-only .project-actions .detail-action-import,
  .detail-actions-only .project-actions .detail-action-edit {
    grid-column: span 1;
  }

  .detail-actions-only .project-actions .detail-action-delete,
  .detail-actions-only .project-actions .detail-action-delete:last-child {
    grid-column: span 2;
    color: #9f3a3a;
    background: #fff;
    border: 1px solid rgba(180, 58, 58, 0.28);
    font-size: 12px;
    font-weight: 800;
    box-shadow: none;
  }

  .detail-actions-only .project-actions .detail-action-delete:hover {
    color: #8f2f2f;
    background: rgba(180, 58, 58, 0.06);
    border-color: rgba(180, 58, 58, 0.42);
  }
}

/* 2026-06-25 reduce mobile outline density */
@media (max-width: 860px) {
  .shell,
  .shell.shell-wide {
    width: 100%;
    padding-inline: 12px;
  }

  .topbar {
    border-bottom-color: rgba(27, 39, 51, 0.08);
  }

  .project-panel.panel {
    padding: 14px 12px;
    background: #fff;
    border-color: rgba(214, 224, 232, 0.7);
    box-shadow: 0 8px 22px rgba(27, 58, 82, 0.07);
  }

  .project-owner-filter select,
  .project-filter-actions .compact {
    border-color: rgba(214, 224, 232, 0.72);
    box-shadow: none;
  }

  .project-filter-actions .compact:not(.active) {
    color: #3447dc;
    background: #f8faff;
  }

  .mobile-project-list {
    gap: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
  }

  .mobile-project-card {
    position: relative;
    gap: 7px;
    padding: 15px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.14s ease;
  }

  .mobile-project-card + .mobile-project-card {
    border-top: 1px solid rgba(214, 224, 232, 0.72);
  }

  .mobile-project-card:focus-visible {
    outline: 3px solid rgba(23, 36, 192, 0.18);
    outline-offset: -2px;
  }

  .mobile-project-card:active {
    background: rgba(23, 36, 192, 0.035);
  }

  .mobile-project-card::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px -12px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
  }

  .mobile-project-card:active::before {
    background: rgba(23, 36, 192, 0.32);
  }

  .mobile-card-heading,
  .mobile-card-meta,
  .mobile-card-stats,
  .mobile-card-actions {
    padding-inline: 4px;
  }

  .mobile-card-title {
    color: #1724c0;
    font-size: 15px;
  }

  .mobile-card-heading .badge,
  .mobile-project-card .badge {
    border: 0;
    font-size: 11px;
  }

  .badge.ok {
    color: #1724c0;
    background: rgba(23, 36, 192, 0.08);
  }

  .badge.wait {
    color: #a33a3a;
    background: rgba(180, 58, 58, 0.09);
  }

  .mobile-card-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 2px;
  }

  .mobile-card-actions > * {
    min-height: 30px;
    color: #1724c0;
    background: #f8faff;
    border-color: rgba(23, 36, 192, 0.16);
    box-shadow: none;
  }

  .mobile-card-actions > *:hover {
    background: #f0f3ff;
    border-color: rgba(23, 36, 192, 0.24);
  }
}

/* 2026-07-17 final login visual overrides */
.auth-page {
  background:
    radial-gradient(circle at 16% 14%, rgba(230, 167, 0, 0.16), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(23, 36, 192, 0.16), transparent 34%),
    linear-gradient(135deg, #eef4f8 0%, #f8fbff 46%, #eef2f7 100%);
}

.auth-shell {
  overflow: hidden;
  border: 1px solid rgba(158, 176, 196, 0.45);
  background: #fff;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #1724c0;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  z-index: 0;
}

.auth-visual {
  z-index: 1;
}

.auth-brand-panel .auth-mark,
.auth-brand-panel h1,
.auth-brand-panel p,
.auth-points {
  position: relative;
  z-index: 2;
}

.auth-card {
  position: relative;
  z-index: 2;
  border-color: rgba(196, 209, 223, 0.72);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #1724c0, #e6a700, #1724c0);
}

.auth-shell .site-footer {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 16px 16px;
  background: #fff;
}

@media (min-width: 861px) {
  .auth-shell {
    width: min(1080px, calc(100% - 48px));
    min-height: 620px;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  }

  .auth-brand-panel {
    padding: 74px 70px;
  }

  .auth-brand-panel h1 {
    max-width: 560px;
    font-size: 52px;
  }

  .auth-brand-panel p {
    max-width: 620px;
    font-size: 18px;
  }
}

@media (max-width: 860px) {
  .auth-visual {
    height: 70%;
  }

  .auth-brand-panel h1 {
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  }

  .auth-shell .site-footer {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* 2026-07-17 remove desktop login bottom gap */
.auth-shell {
  align-content: start;
}

.auth-card {
  justify-content: flex-start;
}

@media (min-width: 861px) {
  .auth-shell {
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .auth-brand-panel,
  .auth-card {
    min-height: 480px;
  }

  .auth-card {
    padding-top: 94px;
  }

  .auth-shell .site-footer {
    border-top: 1px solid rgba(214, 224, 232, 0.64);
  }
}

/* 2026-07-17 construction scene background */
.auth-page {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(238, 244, 248, 0.92), rgba(237, 243, 250, 0.76)),
    url("login-backdrop.svg") center / cover no-repeat;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(230, 167, 0, 0.2), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(23, 36, 192, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(238, 244, 248, 0.58));
}

.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(23, 36, 192, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 36, 192, 0.28) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.6), transparent 66%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.auth-card {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(23, 36, 192, 0.045) 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(23, 36, 192, 0.045) 24px);
}

.auth-card::after {
  content: "";
  position: absolute;
  right: -84px;
  bottom: -72px;
  width: 260px;
  height: 260px;
  pointer-events: none;
  opacity: 0.13;
  border: 22px solid #1724c0;
  border-radius: 36px;
  transform: rotate(18deg);
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  .auth-page {
    background:
      linear-gradient(180deg, rgba(7, 17, 95, 0.18), rgba(255, 255, 255, 0.94) 46%),
      url("login-backdrop.svg") center top / cover no-repeat;
  }

  .auth-visual {
    inset: 0;
    height: 100%;
    overflow: hidden;
  }

  .auth-visual img {
    object-position: center top;
    transform: translateY(-14%) scale(1.18);
    transform-origin: center top;
  }

  .auth-visual::after {
    background: linear-gradient(180deg, rgba(23, 36, 192, 0.16) 0%, rgba(23, 36, 192, 0.28) 30%, rgba(23, 36, 192, 0.08) 100%);
  }

  .auth-card::after {
    display: none;
  }
}

/* 2026-07-17 project filter/content separation */
.project-filter-region {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(23, 36, 192, 0.14);
  border-left: 3px solid #1724c0;
  border-radius: 6px;
  background: #f6f8ff;
}

.project-filter-label {
  color: #52627b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.project-filter-region .project-filter-actions {
  justify-content: flex-start;
}

.project-list-region {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(172, 188, 207, 0.52);
}

.project-list-region-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #263650;
  font-size: 13px;
  font-weight: 900;
}

.project-list-region-head span:last-child {
  color: #6b7a90;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .project-panel .project-list-head {
    margin-bottom: 0;
  }

  .project-filter-region {
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-left-width: 2px;
  }

  .project-filter-region .project-filter-actions {
    width: 100%;
    justify-self: stretch;
  }

  .project-list-region {
    margin-top: 16px;
    padding-top: 11px;
  }

  .project-list-region-head {
    margin-bottom: 6px;
  }
}

/* 2026-07-17 mobile login hero fills the complete top panel */
@media (max-width: 860px) {
  .auth-brand-panel .auth-visual {
    inset: 0;
    height: 100%;
    opacity: 1;
    background: url("construction-hero.svg") center center / cover no-repeat;
  }

  .auth-brand-panel .auth-visual img {
    object-position: center center;
    transform: scale(1.38);
    transform-origin: center center;
  }

  .auth-brand-panel .auth-visual::after {
    background: linear-gradient(180deg, rgba(23, 36, 192, 0.08) 0%, rgba(23, 36, 192, 0.2) 45%, rgba(7, 16, 87, 0.16) 100%);
  }
}
