:root {
  --v2-accent: #4f6f64;
  --v2-accent-dark: #3f5b52;
  --v2-soft: #f3f6f4;
  --v2-line: #e5e8e5;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
}

.admin-row-actions .danger-text,
.dictionary-main .danger-text {
  color: #a13b36;
}

.record-toolbar.admin-booking-filter {
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(120px, .45fr)) auto;
}

.dictionary-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
}

.dictionary-sidebar {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--v2-line);
  background: #f8f8f6;
}

.dictionary-sidebar-head,
.dictionary-editor-head,
.storage-path {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dictionary-sidebar-head {
  align-items: center;
  margin-bottom: 12px;
}

.dictionary-sidebar-head>span {
  display: flex;
  gap: 5px;
}

.dictionary-group {
  margin: 7px 0;
}

.dictionary-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 7px;
  cursor: pointer;
  color: #4d4a43;
  font-size: 12px;
  font-weight: 700;
}

.dictionary-group summary small {
  color: #9a968e;
  font-size: 10px;
  font-weight: 400;
}

.dictionary-category-list {
  display: grid;
  gap: 2px;
  padding-left: 12px;
}

.dictionary-category-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f5b54;
  font-size: 12px;
  text-align: left;
}

.dictionary-category-list button:hover {
  background: #ecece8;
}

.dictionary-category-list button.active {
  background: #e1ebe5;
  color: #254d3e;
  font-weight: 700;
}

.dictionary-category-list button small {
  color: #9a968e;
  font-size: 9px;
  font-weight: 400;
}

.dictionary-main {
  min-width: 0;
  padding: 18px;
}

.dictionary-editor-head {
  margin-bottom: 14px;
}

.dictionary-editor-head h3 {
  margin: 0 0 5px;
  color: #3d3a35;
  font-size: 18px;
}

.dictionary-editor-head p {
  margin: 0;
  color: #858178;
  font-size: 12px;
}

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

.dictionary-folder {
  overflow: hidden;
  border: 1px solid #e4e3df;
  border-radius: 9px;
}

.dictionary-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f8f6;
}

.dictionary-folder-head>div,
.dictionary-model-rows>div,
.dictionary-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dictionary-model-rows {
  display: grid;
}

.dictionary-model-rows>div {
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 12px;
  border-top: 1px solid #efefec;
  font-size: 12px;
}

.dictionary-model-rows>p {
  margin: 0;
  padding: 10px 12px;
}

.dictionary-value-list {
  display: grid;
  gap: 7px;
}

.dictionary-value-row input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #dededb;
  border-radius: 6px;
}

.dictionary-value-row .dictionary-device-letter {
  flex: 0 0 42px;
  text-align: center;
  text-transform: uppercase;
}

.admin-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.storage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.storage-card {
  padding: 18px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
}

.storage-path {
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f8f6;
}

.storage-path code {
  color: #4d554f;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.storage-path span,
.storage-path.ok b {
  color: #287151;
  font-size: 11px;
}

.storage-path.error b,
.storage-path.error span {
  color: #a13b36;
}

@media (max-width: 980px) {
  .record-toolbar.admin-booking-filter,
  .storage-grid {
    grid-template-columns: 1fr 1fr;
  }

  .record-toolbar.admin-booking-filter input {
    grid-column: 1 / -1;
  }

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

@media (max-width: 760px) {
  .record-toolbar.admin-booking-filter,
  .storage-grid,
  .dictionary-layout {
    grid-template-columns: 1fr;
  }

  .dictionary-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  .dictionary-main {
    padding: 14px;
  }

  .dictionary-folder-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dictionary-value-row {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

.status-report-toolbar .date-field {
  display: grid;
  gap: 4px;
}

.status-report-toolbar .date-field span {
  color: var(--text-tertiary);
  font-size: 11px;
}

.status-report-toolbar input[type="date"] {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.tabs button b {
  margin-left: 6px;
  color: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.status-content .contract-import-list {
  display: grid;
  gap: 10px;
}

.status-content .panel-title > div small {
  display: block;
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 400;
}

.calendar .day .event b,
.calendar .day .event small {
  display: block;
}

.calendar .day .event small {
  margin-top: 3px;
  color: var(--text-tertiary);
}

@media (max-width: 760px) {
  .status-report-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .status-report-toolbar .date-separator {
    display: none;
  }

  .status-report-toolbar button {
    min-height: 42px;
  }

  .calendar {
    grid-template-columns: 1fr;
  }

  .calendar .day {
    min-height: 0;
  }
}

body {
  background: #fbfbfa;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--v2-accent);
  outline-offset: 2px;
}

.login-company span {
  letter-spacing: .02em;
}

.login-card {
  box-shadow: 0 18px 60px rgba(46, 61, 54, .10);
}

.login-submit:disabled {
  cursor: wait;
  opacity: .7;
}

#app {
  min-height: 100vh;
}

#app > aside {
  background: #f3f3f1;
  border-right: 1px solid #e5e4e0;
}

#app main {
  min-width: 0;
}

.brand span b {
  color: #2f3d37;
}

#nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-gutter: stable;
}

#app > aside>.brand,
.aside-foot {
  flex: 0 0 auto;
}

.nav-group {
  margin-top: 7px;
}

.nav-group-label {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #77746c;
  padding: 10px 14px 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
}

.nav-group-label::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}

.nav-group.open>.nav-group-label::after {
  transform: rotate(90deg);
}

.nav-group-items {
  display: grid;
  gap: 2px;
}

.nav-group:not(.open)>.nav-group-items {
  display: none;
}

.nav-group-items button {
  min-height: 38px;
  border-radius: 7px;
  padding: 8px 12px 8px 20px;
  color: #4e4c46;
}

.nav-group-items button.active {
  background: #dde7e1;
  color: #264a3d;
  font-weight: 700;
}

.nav-group-items button:hover {
  background: #e8ebe8;
}

.mobile-topbar {
  display: none;
}

.mobile-backdrop {
  display: none;
}

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

.workbench-card {
  grid-column: span 4;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(47, 61, 55, .03);
}

.workbench-card.wide {
  grid-column: span 8;
}

.workbench-card.full {
  grid-column: 1 / -1;
}

.workbench-card h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.workbench-card p {
  margin: 0;
  color: #77746c;
  line-height: 1.65;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metric {
  background: var(--v2-soft);
  border-radius: 8px;
  padding: 12px;
}

.metric b {
  display: block;
  font-size: 22px;
}

.metric small {
  color: #77746c;
}

.workbench-list {
  display: grid;
  gap: 2px;
  margin-top: 13px;
}

.workbench-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eef0ed;
  color: #3f3c36;
  text-decoration: none;
}

.workbench-list a:last-child {
  border-bottom: 0;
}

.workbench-list a span {
  color: #7e7a73;
  font-size: 12px;
  text-align: right;
}

.workbench-foot,
.workbench-empty {
  margin-top: 13px;
  color: #77746c;
  font-size: 13px;
}

.layout-list {
  display: grid;
  gap: 7px;
}

.layout-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px 34px;
  gap: 7px;
  align-items: center;
  padding: 9px;
  border: 1px solid #e2e5e1;
  border-radius: 7px;
  background: #fafbf9;
}

.layout-row label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.layout-row button {
  min-height: 30px;
  border: 1px solid #dde1dd;
  border-radius: 5px;
  background: #fff;
}

.drag-handle {
  color: #8a867f;
  cursor: grab;
}

.dispatch-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}

.dispatch-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  border: 0;
  border-right: 1px solid var(--v2-line);
  background: transparent;
  color: #66625b;
  cursor: pointer;
}

.dispatch-tabs button:last-child {
  border-right: 0;
}

.dispatch-tabs button.active {
  background: #e8f0eb;
  color: #244c3d;
  font-weight: 700;
}

.dispatch-tabs b {
  min-width: 21px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: 11px;
}

.dispatch-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.dispatch-table .dispatch-actions {
  margin-top: 0;
}

.small {
  min-height: 29px;
  padding: 4px 9px;
  font-size: 12px;
}

.onsite-meta {
  max-width: 900px;
}

.onsite-drop {
  display: grid;
  place-items: center;
  min-height: 230px;
  margin: 18px 0;
  padding: 28px;
  border: 2px dashed #cfd7d1;
  border-radius: 12px;
  background: #fbfcfa;
  text-align: center;
}

.onsite-drop.dragging {
  border-color: var(--v2-accent);
  background: #edf5f0;
}

.onsite-drop b {
  font-size: 20px;
}

.onsite-drop p {
  margin: 7px 0 18px;
  color: #77746c;
}

.onsite-drop>div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.onsite-mobile-capture {
  display: none;
}

.onsite-burst-camera {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid #dce3dd;
  border-radius: 12px;
  background: #fff;
}

.burst-camera-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e6ebe7;
}

.burst-camera-head>div {
  display: grid;
  gap: 2px;
}

.burst-camera-head b {
  color: #303a34;
}

.burst-camera-head span {
  color: #828a85;
  font-size: 11px;
}

.burst-camera-head strong {
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf4ef;
  color: #315f4c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.onsite-burst-camera video {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 55vh;
  object-fit: contain;
  background: #101514;
}

.burst-camera-actions,
.burst-camera-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}

.burst-camera-actions button {
  flex: 1;
}

.burst-camera-foot {
  justify-content: space-between;
  border-top: 1px solid #e6ebe7;
}

.burst-camera-foot span {
  color: #737b76;
  font-size: 12px;
}

.burst-camera-foot button {
  flex: 0 0 auto;
}

.burst-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 0 14px 12px;
}

.burst-thumbs:empty {
  display: none;
}

.burst-thumbs figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfe5e0;
  border-radius: 8px;
  background: #f8faf8;
}

.burst-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e9eeea;
}

.burst-thumbs figcaption {
  display: grid;
  gap: 4px;
  padding: 6px;
  color: #626b65;
  font-size: 10px;
  text-align: center;
}

.burst-thumbs figcaption button {
  min-height: 30px;
  padding: 4px;
  border: 1px solid #e1c6c2;
  border-radius: 5px;
  background: #fff7f6;
  color: #a04238;
  font-size: 11px;
}

.recording-bar {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 11px 14px;
  border-radius: 8px;
  background: #fff0ee;
  color: #8d3229;
}

.recording-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.recording-meta,
.recording-size {
  color: #8d3229;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.recording-size {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(198, 59, 49, 0.09);
  font-weight: 700;
}

.recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c63b31;
  animation: record-pulse 1s infinite;
}

@keyframes record-pulse {
  50% { opacity: .3; }
}

.upload-list {
  display: grid;
  gap: 7px;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(120px, 180px) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e3e6e2;
  border-radius: 7px;
  background: #fff;
}

.upload-row small {
  color: #77746c;
  text-align: right;
}

.upload-delete {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dfc2be;
  border-radius: 6px;
  color: #9d4037;
  background: #fff8f7;
  cursor: pointer;
  white-space: nowrap;
}

.upload-delete:hover {
  border-color: #c9948d;
  background: #fff1ef;
}

.upload-delete:disabled {
  color: #9c9692;
  cursor: wait;
}

.upload-row.success {
  border-color: #b8dbc7;
}

.upload-row.failed {
  border-color: #e2b7b1;
  background: #fff8f7;
}

.onsite-page .recording-bar button {
  margin-left: auto;
}

@media (max-width: 760px) {
  .upload-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .upload-row > span,
  .upload-row > small {
    grid-column: 1;
  }

  .upload-row > small {
    text-align: left;
  }

  .upload-delete {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .recording-bar {
    gap: 8px 12px;
    padding: 10px 12px;
  }

  .recording-state {
    width: 100%;
  }

  .onsite-page .recording-bar button {
    margin-left: auto;
  }
}

.camera-recording {
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #dfe5e0;
  border-radius: 10px;
  background: #151918;
}

.camera-recording video {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 55vh;
  object-fit: contain;
  background: #0d100f;
}

.camera-recording-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: #fff0ee;
  color: #8d3229;
}

.camera-recording-bar time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.camera-recording-bar button {
  min-height: 40px;
  margin-left: auto;
}

@media (max-width: 760px) {
  .onsite-mobile-capture {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .onsite-desktop-capture {
    display: none !important;
  }

  .camera-recording video {
    min-height: 190px;
  }

  .onsite-burst-camera video {
    min-height: 190px;
  }

  .burst-camera-actions,
  .burst-camera-foot {
    padding-inline: 10px;
  }

  .burst-thumbs {
    gap: 5px;
    padding-inline: 10px;
  }

  .burst-camera-foot span {
    min-width: 0;
    line-height: 1.4;
  }
}

.fieldwork-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  background: #fff;
}

.fieldwork-head p {
  margin: 5px 0 0;
  color: #77746c;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #e1e4e0;
  border-radius: 7px;
}

.check-grid label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.signature-canvas {
  width: 100%;
  height: 220px;
  border: 1px solid #cfd4cf;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.admin-head {
  margin-top: 12px;
}

.admin-user-table td,
.admin-user-table th {
  padding: 10px 12px;
}

.admin-permission-title {
  margin: 0;
}

.permission-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 8px;
}

.permission-table {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
}

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

.permission-table th,
.permission-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eceeeb;
  text-align: center;
}

.permission-table th:first-child,
.permission-table td:first-child {
  text-align: left;
}

.permission-group-actions {
  display: flex;
  gap: 7px;
}

.permission-top-pages .permission-page-row td {
  background: #fafbf9;
  border-bottom-color: #dfe3de;
}

.permission-bottom-pages .permission-page-row td {
  border-top: 2px solid #dfe3de;
  background: #fafbf9;
}

.permission-group.collapsed .permission-page-row {
  display: none;
}

.permission-group-row td {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0;
  border-top: 1px solid #dfe3de;
  border-bottom: 1px solid #dfe3de;
  background: #edf1ed;
  color: #3c5147;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
}

.permission-group:first-of-type .permission-group-row td {
  border-top: 0;
}

.permission-group-row .permission-group-action-cell {
  padding: 8px 10px;
  text-align: center;
}

.permission-group-row .permission-group-action-cell input {
  accent-color: var(--v2-accent);
}

.permission-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.permission-group-toggle>span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-group-toggle:hover {
  background: #e5ebe6;
}

.permission-group-caret {
  color: #73877d;
  font-style: normal;
  transition: transform .16s ease;
}

.permission-group:not(.open) .permission-group-caret {
  transform: rotate(-90deg);
}

.permission-group-row .folder-icon {
  color: #73877d;
  font-style: normal;
}

.permission-group-title-cell {
  min-width: 170px;
}

.permission-page-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.permission-page-name svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-scopes {
  margin-top: 14px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--v2-line);
}

.admin-tabs button {
  padding: 8px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #66625b;
}

.admin-tabs button.active {
  background: #e7eee9;
  color: #244c3d;
  font-weight: 700;
}

.admin-account-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-group-pane {
  position: sticky;
  top: 14px;
  min-height: 360px;
  padding: 12px;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  background: #fff;
}

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

.admin-group-tree {
  display: grid;
  gap: 2px;
}

.admin-group-row {
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.admin-group-expand {
  width: 24px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #6f6b64;
  font-size: 18px;
  cursor: pointer;
  transition: transform .15s ease;
}

.admin-group-expand.open {
  transform: rotate(90deg);
}

.admin-group-expand:disabled {
  visibility: hidden;
}

.admin-group-children {
  display: none;
}

.admin-group-children.open {
  display: block;
}

.admin-group-row:hover,
.admin-group-row.active {
  background: #e8f0eb;
}

.admin-group-select {
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #3f3c36;
  text-align: left;
}

.admin-group-select b {
  color: #7b776f;
  font-size: 12px;
}

.admin-group-select span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.folder-icon {
  color: #df9f2f;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
}

.admin-group-actions {
  display: flex;
  padding-right: 5px;
}

.admin-group-actions button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #77746c;
  cursor: pointer;
}

.admin-group-actions button:hover {
  background: #fff;
  color: #294c3f;
}

.admin-users-pane {
  min-width: 0;
}

.preview-folder {
  margin-bottom: 8px;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  overflow: hidden;
}

.preview-file-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid #eef0ed;
}

.admin-users-pane {
  min-width: 0;
}

.inline-preview {
  padding: 12px;
  border-top: 1px solid var(--v2-line);
  background: #f7f8f6;
}

.report-video {
  width: 100%;
  max-height: 520px;
  border-radius: 8px;
  background: #111;
}

.report-image {
  display: block;
  max-width: 100%;
  max-height: 560px;
  margin: auto;
  border-radius: 8px;
}

.report-pdf {
  width: 100%;
  height: 600px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.report-html {
  width: 100%;
  height: min(76vh, 860px);
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.modal.preview-mode .modal-card {
  width: min(1180px, 96vw);
}

.modal.report-browser-mode {
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.modal.report-browser-mode .modal-card {
  width: min(1180px, 96vw);
  height: auto;
  max-height: calc(100dvh - 56px);
  padding: 24px 28px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(24, 24, 24, .2);
}

.modal.report-browser-mode .modal-head {
  align-items: flex-start;
  border-bottom: 0;
  padding-bottom: 12px;
}

.modal.report-browser-mode .modal-head h2 {
  color: #30302c;
  font-size: 20px;
  letter-spacing: -.01em;
}

.modal.report-browser-mode .modal-head p {
  margin-top: 7px;
  color: #888780;
  font-size: 12px;
}

.report-folder-sheet {
  margin-top: 6px;
  padding: 18px;
  border: 1px solid #e6e4df;
  border-radius: 14px;
  background: #fff;
}

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

.report-folder-head h3 {
  margin: 0;
  color: #383733;
  font-size: 17px;
}

.report-folder-head p {
  margin: 7px 0 0;
  color: #9a9892;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.report-folder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 7px;
  color: #77756e;
  font-size: 11px;
}

.report-folder-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.report-action-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #dededb;
  border-radius: 9px;
  background: #fff;
  color: #57554f;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.report-action-button:hover {
  border-color: #b8acdf;
  background: #faf9ff;
  color: #6650c4;
}

.report-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 218px));
  gap: 12px;
  margin-top: 14px;
}

.report-category-card {
  display: flex;
  min-height: 158px;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ececea;
  border-radius: 12px;
  background: #fff;
  color: #3e3d38;
  text-align: left;
}

.report-category-card:hover,
.report-category-card.active {
  border-color: #cfc5f4;
  box-shadow: 0 7px 20px rgba(97, 75, 185, .1);
}

.report-category-card b,
.report-category-card small {
  margin-right: 14px;
  margin-left: 14px;
}

.report-category-card b {
  margin-top: 13px;
  font-size: 13px;
}

.report-category-card small {
  margin-top: 5px;
  color: #98958e;
  font-size: 11px;
}

.report-category-icon {
  position: relative;
  display: block;
  width: 100%;
  height: 88px;
  background: #f8f6ff;
}

.report-category-icon::before {
  content: "";
  position: absolute;
  top: 29px;
  left: 50%;
  width: 30px;
  height: 23px;
  border: 1.6px solid #7055ce;
  border-radius: 3px;
  transform: translateX(-50%);
}

.report-category-icon::after {
  content: "";
  position: absolute;
  top: 24px;
  left: calc(50% - 15px);
  width: 14px;
  height: 8px;
  border: 1.6px solid #7055ce;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #f8f6ff;
}

.report-category-files {
  display: none;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e9e5fb;
  border-radius: 10px;
  background: #fbfaff;
}

.report-category-files.open {
  display: block;
}

.report-folder-overview[hidden],
.report-category-view[hidden] {
  display: none !important;
}

.report-category-view {
  margin-top: 6px;
}

.report-category-view-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border: 1px solid #e8e2fb;
  border-radius: 11px;
  background: #faf8ff;
}

.report-folder-back {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid #6f55cc;
  border-radius: 9px;
  background: #7055ce;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.report-folder-back:hover {
  border-color: #6045c0;
  background: #6045c0;
}

.report-folder-back:active {
  transform: translateY(1px);
}

.report-category-view-copy {
  min-width: 0;
}

.report-category-view-copy b,
.report-category-view-copy small {
  display: block;
}

.report-category-view-copy b {
  color: #3d3850;
  font-size: 14px;
}

.report-category-view-copy small {
  margin-top: 3px;
  color: #8d879e;
  font-size: 11px;
}

.report-category-package {
  min-height: 34px;
  padding: 6px 10px;
}

.report-category-view .report-file-thumb-grid {
  margin-top: 13px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 172px));
}

.report-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 9px;
  color: #4b475d;
  font-size: 12px;
}

.report-category-title span {
  color: #9994a9;
}

.report-file-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.report-file-thumb {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e3dfef;
  border-radius: 9px;
  background: #fff;
  color: #3d3a35;
  text-align: left;
}

.report-file-thumb:hover {
  border-color: #a998e8;
  box-shadow: 0 8px 20px rgba(84, 64, 166, .12);
  transform: translateY(-1px);
}

.report-file-thumb:active {
  transform: translateY(0) scale(.995);
}

.report-thumb-media {
  position: relative;
  display: grid;
  width: 100%;
  height: 118px;
  place-items: center;
  overflow: hidden;
  background: #f7f5fc;
}

.report-thumb-media img,
.report-thumb-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-thumb-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  pointer-events: none;
  transform: scale(1.03);
}

.report-thumb-type {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #7055ce;
}

.report-thumb-type span {
  display: grid;
}

.report-thumb-type small {
  color: #9994a9;
  font-size: 10px;
}

.report-thumb-glyph {
  position: relative;
  width: 50px;
  height: 56px;
  place-items: center;
}

.report-thumb-glyph i {
  position: relative;
  display: block;
  width: 24px;
  height: 30px;
  border: 1.6px solid #7961d3;
  border-radius: 4px;
  background: #fff;
}

.report-thumb-glyph i::after {
  content: "";
  position: absolute;
  top: -1.6px;
  right: -1.6px;
  width: 9px;
  height: 9px;
  border-bottom: 1.6px solid #7961d3;
  border-left: 1.6px solid #7961d3;
  border-radius: 0 3px 0 0;
  background: #f7f5fc;
}

.report-thumb-glyph.drawing i {
  width: 25px;
  height: 25px;
  border-radius: 3px;
  transform: rotate(30deg) skew(-9deg, -9deg);
  box-shadow: 5px -5px 0 -1px #f7f5fc, 5px -5px 0 0 #7961d3;
}

.report-thumb-glyph.drawing i::after {
  display: none;
}

.report-thumb-glyph b {
  display: block;
  min-width: 30px;
  margin-top: -4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #8069dc;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .02em;
}

.report-thumb-play {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(35, 31, 47, .76);
  color: #fff;
  font-size: 13px;
}

.report-thumb-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 9px 10px 10px;
}

.report-thumb-copy b {
  overflow: hidden;
  color: #403d38;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-thumb-copy small {
  overflow: hidden;
  color: #98948b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-folder-hint {
  margin: 12px 0 0;
  color: #96938c;
  font-size: 11px;
}

.report-search-all {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #e8e7e3;
  border-radius: 10px;
  background: #fff;
  color: #55534d;
  text-align: left;
}

.report-search-all:hover {
  border-color: #cfc9bb;
  background: #fcfbf9;
}

#modalBody.has-report-preview {
  overflow: hidden;
}

.report-preview-layer {
  position: fixed;
  z-index: calc(var(--z-overlay) + 1);
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 25, 35, .58);
  backdrop-filter: blur(3px);
}

.report-preview-layer-card {
  display: grid;
  width: min(1080px, calc(100vw - 48px));
  max-height: min(90dvh, 900px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(24, 21, 37, .34);
}

.report-preview-layer-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 17px;
  border-bottom: 1px solid #e8e7e3;
  background: #fff;
}

.report-preview-layer-head>div {
  min-width: 0;
}

.report-preview-layer-head b,
.report-preview-layer-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-preview-layer-head b {
  color: #393732;
  font-size: 14px;
}

.report-preview-layer-head small {
  margin-top: 3px;
  color: #908d85;
  font-size: 11px;
}

.report-preview-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #dedbd5;
  border-radius: 8px;
  background: #f8f7f4;
  color: #55524c;
  font-size: 20px;
  line-height: 1;
}

.report-preview-close:hover {
  background: #efede8;
  color: #282622;
}

.report-preview-layer-body {
  min-height: 0;
  padding: 12px;
  overflow: auto;
  background: #f5f5f2;
}

.report-preview-layer-body .preview-stage {
  min-height: min(72dvh, 760px);
  background: #f2f2ef;
}

.report-preview-layer-body .preview-document {
  height: min(72dvh, 760px);
}

.preview-stage {
  display: grid;
  min-height: min(70vh, 720px);
  place-items: center;
  padding: 10px;
  border-radius: 9px;
  background: #f5f6f4;
}

.preview-media {
  width: 100%;
  max-width: 100%;
}

.preview-document {
  height: min(76vh, 860px);
}

.preview-fallback {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 20px;
  border: 1px dashed var(--v2-line);
  border-radius: 10px;
  color: #6f6b64;
  text-align: center;
}

.report-list .report-file {
  grid-template-columns: 88px minmax(0, 1fr) auto auto;
}

@media (max-width: 760px) {
  .preview-file-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .modal.preview-mode .modal-card {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .modal.report-browser-mode {
    align-items: flex-end;
    padding: 0;
  }

  .modal.report-browser-mode .modal-card {
    width: 100%;
    max-height: 94dvh;
    padding: 18px 14px 12px;
    border-radius: 16px 16px 0 0;
  }

  .report-folder-sheet {
    padding: 14px;
  }

  .report-folder-head {
    flex-direction: column;
  }

  .report-folder-actions {
    width: 100%;
  }

  .report-action-button {
    justify-content: center;
    width: 100%;
  }

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

  .report-category-view-head {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .report-folder-back {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .report-category-package {
    min-height: 32px;
  }

  .report-category-view .report-file-thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-category-card {
    min-height: 142px;
  }

  .report-category-card small {
    line-height: 1.5;
  }

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

  .report-thumb-media {
    height: 100px;
  }

  .preview-stage {
    min-height: 45vh;
    padding: 0;
  }

  .preview-document {
    height: 68vh;
  }

  .report-preview-layer {
    align-items: stretch;
    padding: 0;
  }

  .report-preview-layer-card {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .report-preview-layer-head {
    min-height: 54px;
    padding: 8px 10px 8px 13px;
  }

  .report-preview-layer-head>div:first-child {
    min-width: 0;
    flex: 1;
  }

  .report-preview-layer-body {
    padding: 8px;
  }

  .report-preview-layer-body .preview-stage {
    min-height: calc(100dvh - 78px);
    padding: 0;
  }

  .report-preview-layer-body .preview-document {
    height: calc(100dvh - 78px);
  }

  .report-list .report-file {
    grid-template-columns: 74px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .admin-account-layout {
    grid-template-columns: 1fr;
  }

  .admin-group-pane {
    position: static;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .check-grid {
    grid-template-columns: 1fr;
  }
  .fieldwork-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .dispatch-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.page-empty {
  border: 1px dashed #d8ddd9;
  border-radius: 10px;
  padding: 34px 24px;
  text-align: center;
  color: #77746c;
  background: #fcfcfb;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 3000;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: 8px;
  background: #26352f;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.toast.error {
  background: #9f3434;
}

.toast.success {
  background: #35694f;
}

.booking-wizard {
  max-width: 980px;
  margin: 0 auto;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 20px 0 12px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.wizard-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  color: #85817a;
}

.wizard-step + .wizard-step {
  border-left: 1px solid var(--v2-line);
}

.wizard-step b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eceeeb;
  color: #716d66;
}

.wizard-step.active {
  color: #2c493e;
  background: #f4f8f5;
  font-weight: 700;
}

.wizard-step.active b,
.wizard-step.done b {
  background: var(--v2-accent);
  color: #fff;
}

.wizard-help {
  margin-bottom: 14px;
  color: #77746c;
  font-size: 13px;
}

.wizard-panel {
  display: none;
  min-height: 360px;
  padding: 24px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
}

.wizard-panel.active {
  display: block;
  animation: wizard-in .18s ease both;
}

@keyframes wizard-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-panel-head {
  margin-bottom: 22px;
}

.wizard-panel-head h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.wizard-panel-head p {
  margin: 0;
  color: #77746c;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.entrust-type-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.entrust-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  background: #fff;
  color: #4f554f;
  font-weight: 600;
  text-align: left;
}

.entrust-type-option i {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1.5px solid #aeb8b1;
  border-radius: 50%;
  background: #fff;
}

.entrust-type-option:hover {
  border-color: #8aa596;
  background: #f7faf8;
}

.entrust-type-option.selected {
  border-color: var(--v2-accent);
  background: #eef6f1;
  color: #234b3b;
  box-shadow: inset 0 0 0 1px var(--v2-accent);
}

.entrust-type-option.selected i {
  border: 5px solid var(--v2-accent);
}

.field em {
  color: #a13b36;
  font-style: normal;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #8a867f;
  font-size: 12px;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.wizard-actions>span {
  margin-right: auto;
  color: #77746c;
  font-size: 13px;
}

.duplicate-warning {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #e7c98f;
  border-radius: 8px;
  background: #fff9ea;
  color: #79551e;
}

.duplicate-warning p {
  margin: 5px 0 9px;
}

.duplicate-warning label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.records-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.record-filter-tree {
  position: sticky;
  top: 16px;
  width: auto;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
}

.record-filter-tree h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.year-list {
  display: grid;
  gap: 2px;
}

.year-button {
  display: flex;
  justify-content: space-between;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 9px;
  color: #514e48;
  cursor: pointer;
}

.year-button.active {
  background: #e7eee9;
  color: #264a3d;
  font-weight: 700;
}

.year-button b {
  transition: transform .15s ease;
}

.year-button.active b {
  transform: rotate(90deg);
}

.month-list {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 5px 0 8px 7px;
}

.month-list.open {
  display: grid;
}

.month-list button {
  border: 0;
  border-radius: 5px;
  padding: 5px 2px;
  background: transparent;
  color: #77746c;
  cursor: pointer;
  font-size: 12px;
}

.month-list button.active {
  background: var(--v2-accent);
  color: #fff;
}

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

.record-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 140px 130px auto;
  gap: 8px;
}

.record-toolbar input,
.record-toolbar select {
  min-height: 40px;
  border: 1px solid #dfe3df;
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
}

.record-summary {
  margin: 12px 0 8px;
  color: #77746c;
  font-size: 13px;
}

.record-table-wrap {
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #fff;
}

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

.record-table th,
.record-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eceeeb;
  text-align: left;
  vertical-align: top;
}

.record-table th {
  background: #f7f8f6;
  color: #6f6b64;
  font-size: 12px;
  font-weight: 700;
}

.record-table tbody tr {
  cursor: pointer;
}

.record-table tbody tr:hover {
  background: #f7faf8;
}

.record-table td small {
  display: block;
  margin-top: 4px;
  color: #88847d;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #efefed;
  color: #66625b;
  font-size: 12px;
  white-space: nowrap;
}

.status-pending { background: #fff1db; color: #8b5a18; }
.status-assigned { background: #e7eefb; color: #365e9c; }
.status-accepted { background: #e4f3ed; color: #286c52; }
.status-done { background: #e4f5e8; color: #2d743c; }
.status-cancelled { background: #f3e7e5; color: #8f3e34; }

.record-cards {
  display: none;
}

.record-card {
  padding: 14px;
  border-bottom: 1px solid #eceeeb;
  cursor: pointer;
}

.record-card:last-child {
  border-bottom: 0;
}

.record-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.record-card p,
.record-card small {
  margin: 7px 0 0;
  color: #77746c;
}

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

.detail-grid>div {
  padding: 10px;
  border-radius: 7px;
  background: #f7f8f6;
}

.detail-grid small {
  display: block;
  margin-bottom: 4px;
  color: #87837b;
}

.detail-remark {
  margin-top: 14px;
}

.detail-remark div {
  padding: 10px;
  border-radius: 7px;
  background: #f7f8f6;
  white-space: pre-wrap;
}

.drawing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.drawing-list b {
  width: 100%;
}

.drawing-list span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #eef3f0;
}

.report-tree {
  display: grid;
  gap: 8px;
}

.report-person,
.report-machine,
.report-customer {
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.report-machine,
.report-customer {
  margin: 6px 8px;
}

.report-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 0;
  background: #f8f9f7;
  color: #3f3c36;
  text-align: left;
  cursor: pointer;
}

.report-toggle.open {
  background: #eef4f0;
}

.report-branch {
  display: none;
  padding: 6px;
}

.report-branch.open {
  display: block;
}

.report-file {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 4px 7px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #3f3c36;
  text-decoration: none;
}

.report-file:hover {
  background: #f5f8f6;
}

.report-file small {
  color: #88847d;
}

.forecast-none {
  padding: 16px;
  border-top: 1px solid var(--v2-line);
  color: #77746c;
  font-size: 13px;
}

.workbench-task-item span small {
  display: block;
  margin-top: 3px;
  color: #77746c;
  font-size: 11px;
  font-weight: 400;
}

.type-grid .todo-more {
  justify-content: center;
  color: #416352;
  font-size: 12px;
}

.case-head-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.case-head-group span {
  color: #9a968e;
  font-size: 9px;
  font-weight: 400;
}

.case-head-group.active span {
  color: #315a4a;
}

.case-inline-select {
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid #d9ddd8;
  border-radius: 5px;
  background: #fff;
  color: #44423d;
}

.case-inline-select i {
  color: #8b877f;
  font-style: normal;
}

.case-table td small {
  display: block;
  margin-top: 2px;
  color: #88847d;
}

.measurement-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(6, minmax(92px, 0.55fr)) auto;
  align-items: center;
}

.measurement-filters input,
.measurement-filters select {
  width: 100%;
  min-width: 0;
}

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

.measurement-stats article {
  padding: 14px 16px 12px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: #fff;
}

.measurement-stats small {
  display: block;
  color: #817d75;
  font-size: 11px;
}

.measurement-stats b {
  display: inline-block;
  margin-top: 8px;
  color: #3d3a35;
  font-size: 22px;
  line-height: 1;
}

.measurement-stats span {
  margin-left: 4px;
  color: #807c74;
  font-size: 12px;
}

.measurement-stats .filtered b {
  color: #2d6a53;
}

.measurement-table-v2 {
  min-width: 1050px;
  table-layout: fixed;
}

.measurement-table-v2 td small {
  display: block;
  margin-top: 3px;
  color: #8c887f;
}

.measurement-table-v2 th:nth-child(1) { width: 8%; }
.measurement-table-v2 th:nth-child(2) { width: 19%; }
.measurement-table-v2 th:nth-child(3) { width: 9%; }
.measurement-table-v2 th:nth-child(4) { width: 8%; }
.measurement-table-v2 th:nth-child(5) { width: 11%; }
.measurement-table-v2 th:nth-child(6) { width: 12%; }
.measurement-table-v2 th:nth-child(7) { width: 12%; }
.measurement-table-v2 th:nth-child(8) { width: 11%; }
.measurement-table-v2 th:nth-child(9) { width: 10%; }

.measurement-table-v2 td:nth-child(2),
.measurement-table-v2 td:nth-child(6),
.measurement-table-v2 td:nth-child(7) {
  white-space: normal;
}

.measurement-status {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f2eefb;
  color: #7764a9;
  font-size: 11px;
}

.measurement-status.reported {
  background: #e9f5ef;
  color: #21714c;
}

.measurement-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #6d54d9;
  border-radius: 7px;
  background: #7158df;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.measurement-report-btn:hover {
  background: #5e48c2;
}

.measurement-report-btn:disabled,
.measurement-report-btn.is-empty {
  border-color: #d1d5db;
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
}

.measurement-report-btn:disabled:hover,
.measurement-report-btn.is-empty:hover {
  background: #e5e7eb;
}

.measurement-actions {
  display: flex;
  gap: 6px;
}

.measurement-actions .danger-text {
  color: #a13b36;
}

.measurement-cards {
  display: none;
}

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

  .record-toolbar.measurement-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .measurement-filters input {
    grid-column: 1 / -1;
  }
}

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

  .measurement-stats article:last-child {
    grid-column: 1 / -1;
  }

  .measurement-table-v2 {
    display: none;
  }

  .measurement-cards {
    display: grid;
    gap: 9px;
    padding: 10px 0;
  }

  .measurement-cards .dispatch-actions {
    align-items: center;
  }

  .measurement-filters #measurementSearch {
    grid-column: 1 / -1;
  }
}

.file-category {
  padding: 3px 6px;
  border-radius: 5px;
  background: #e7eee9;
  color: #315a4a;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1100px) {
  .workbench-card,
  .workbench-card.wide {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  #app > aside {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2100;
    width: min(84vw, 310px);
    transform: translateX(-104%);
    transition: transform .2s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, .11);
  }

  #app > aside .aside-foot {
    display: block;
    flex: 0 0 auto;
    margin-top: auto;
    padding: 12px 8px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid #e3e3df;
    background: #f3f3f1;
  }

  #app > aside .user-badge {
    margin: 0;
    padding: 0;
  }

  #app > aside .self-actions {
    gap: 8px;
    margin-top: 10px;
  }

  #app > aside .self-actions button {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 13px;
  }

  #app.menu-open > aside {
    transform: translateX(0);
  }

  #app main {
    width: 100%;
    padding-top: 0;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 14px;
    border-bottom: 1px solid var(--v2-line);
    background: rgba(251, 251, 250, .96);
    backdrop-filter: blur(12px);
    font-weight: 700;
  }

  .mobile-topbar .icon {
    min-width: 36px;
    min-height: 36px;
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: block;
    background: rgba(25, 31, 28, .32);
  }

  .page-breadcrumb {
    margin-top: 12px;
  }

  .page-header {
    padding: 0 14px;
  }

  #page {
    padding: 0 14px 28px;
  }

  .workbench-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .workbench-card,
  .workbench-card.wide,
  .workbench-card.full {
    grid-column: 1;
  }

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

  .toast {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .wizard-progress {
    margin-top: 12px;
  }

  .wizard-step {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 11px 9px;
    font-size: 12px;
  }

  .wizard-panel {
    min-height: 0;
    padding: 17px 14px;
  }

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

  .form-grid .wide {
    grid-column: 1;
  }

  .wizard-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 12px -14px -28px;
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--v2-line);
    background: rgba(251,251,250,.96);
    backdrop-filter: blur(10px);
  }

  .wizard-actions>span {
    display: none;
  }

  .records-layout {
    grid-template-columns: 1fr;
  }

  .record-filter-tree {
    position: static;
  }

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

  .month-list {
    grid-column: 1 / -1;
  }

  .record-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .record-toolbar input {
    grid-column: 1 / -1;
  }

  .record-table {
    display: none;
  }

  .record-cards {
    display: block;
  }
}

.record-toolbar.customer-master-filters {
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(120px, .52fr)) auto;
}

.customer-master-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 10px;
  color: #77746c;
  font-size: 12px;
}

.customer-master-summary>div {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.customer-master-actions {
  display: flex;
  gap: 7px;
}

.customer-source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: #77736b;
  font-size: 12px;
}

.customer-source-links a {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  color: var(--v2-accent-dark);
  background: #fff;
  text-decoration: none;
}

.customer-source-links a:hover {
  border-color: var(--v2-accent);
}

.customer-lookup-review {
  margin-top: 14px;
}

.customer-lookup-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.customer-lookup-review-grid>div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  background: #fafbfa;
}

.customer-lookup-review-grid small {
  display: block;
  margin-bottom: 6px;
  color: #77736b;
}

.customer-lookup-review-grid b {
  display: block;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.case-measurement-toggle {
  display: block;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--v2-accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-measurement-panel {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #f8faf8;
}

.case-measurement-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.case-measurement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: #fff;
}

.case-measurement-row>div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.case-measurement-row b {
  overflow-wrap: anywhere;
}

.report-scope-picker {
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--v2-line);
  border-radius: 9px;
  background: #fff;
}

.report-scope-picker label {
  display: block;
  margin-bottom: 7px;
  color: #716d66;
  font-size: 11px;
  font-weight: 700;
}

.report-scope-picker select {
  width: 100%;
  min-height: 38px;
  padding: 6px 30px 6px 9px;
  border: 1px solid #9fa9a3;
  border-radius: 6px;
  background: #fff;
  color: #3f3c36;
}

.report-scope-picker select:focus {
  border-color: var(--v2-accent);
  outline: 2px solid rgba(79, 111, 100, .18);
}

.report-scope-picker small {
  display: block;
  margin-top: 6px;
  color: #8a867f;
  font-size: 10px;
  line-height: 1.4;
}

#nav button[data-page="crm.tasks"] {
  position: relative;
  padding-right: 54px;
}

.nav-warning {
  position: absolute;
  top: 50%;
  right: 11px;
  min-width: 28px;
  padding: 2px 7px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #a44242;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.calendar-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-owner-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.calendar-owner-row select {
  min-width: 220px;
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  background: #fff;
}

.calendar-filters {
  margin: 0;
}

.calendar-filters button {
  min-width: 132px;
}

.task-calendar {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #dde2de;
  border-radius: 8px;
  background: #fff;
}

.task-calendar-weekday {
  min-height: 38px;
  padding: 9px 11px;
  border-right: 1px solid #e6e8e5;
  background: #f7f8f6;
  color: #5e5a53;
  font-size: 12px;
}

.task-calendar-weekday:last-child {
  border-right: 0;
}

.task-calendar .day {
  min-height: 118px;
  padding: 8px 9px;
  border: 0;
  border-top: 1px solid #e6e8e5;
  border-right: 1px solid #e6e8e5;
  border-radius: 0;
  background: #fff;
}

.task-calendar .day:nth-child(7n) {
  border-right: 0;
}

.task-calendar .day.blank {
  background: #fafbf9;
}

.task-calendar .day>b {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #65615a;
}

.task-calendar .day.today>b {
  background: #37352f;
  color: #fff;
}

.calendar-event {
  margin-top: 5px;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef5fb;
  color: #526273;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-name-status {
  display: block;
  margin-top: 5px;
  color: #7b828b;
  font-size: 12px;
  line-height: 1.45;
}

.customer-name-status.valid {
  color: #1b7f4d;
}

.customer-name-status.invalid {
  color: #b3261e;
}

.booking-customer-field {
  position: relative;
}

.customer-suggestion-panel {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #cfd8e3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

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

.customer-suggestion-panel button {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #263548;
  text-align: left;
}

.customer-suggestion-panel button:hover,
.customer-suggestion-panel button:active {
  background: #eef4fb;
}

.customer-suggestion-panel strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.customer-suggestion-panel small {
  display: block;
  margin-top: 2px;
  color: #7b8797;
  font-size: 11px;
  line-height: 1.35;
}

.dispatch-workspace {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.dispatch-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid #d9e5f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #edf5ff 0%, #f8fbff 58%, #eef8f3 100%);
}

.dispatch-hero>div {
  display: grid;
  gap: 2px;
}

.dispatch-hero small,
.dispatch-hero span {
  color: #65768b;
}

.dispatch-hero strong {
  color: #174f86;
  font-size: 30px;
  line-height: 1.1;
}

.dispatch-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  gap: 8px;
  margin-bottom: 12px;
}

.dispatch-toolbar input,
.dispatch-toolbar select,
.dispatch-engineer-field select {
  min-height: 42px;
  border: 1px solid #ccd7e3;
  border-radius: 8px;
  background: #fff;
  padding: 8px 11px;
}

.dispatch-hint {
  margin-bottom: 10px;
  color: #718096;
  font-size: 12px;
}

.dispatch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dispatch-row {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.6fr)
    minmax(155px, .9fr)
    minmax(230px, 1.25fr)
    minmax(180px, 1fr)
    auto;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.dispatch-row:hover,
.dispatch-row:focus-visible {
  border-color: #9bb9d8;
  box-shadow: 0 6px 18px rgba(31, 73, 125, .08);
  outline: none;
}

.dispatch-row-client,
.dispatch-row-info,
.dispatch-row-progress,
.dispatch-row-engineer,
.dispatch-row-action {
  min-width: 0;
}

.dispatch-row-client strong {
  display: block;
  overflow: hidden;
  color: #243449;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-row-client small,
.dispatch-row-client span,
.dispatch-row-info span,
.dispatch-row-engineer label,
.dispatch-row-action small {
  display: block;
  margin-top: 3px;
  color: #748195;
  font-size: 11.5px;
}

.dispatch-row-info b {
  display: block;
  color: #35465a;
  font-size: 13px;
}

.dispatch-row-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.dispatch-row-progress span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #788597;
  font-size: 10.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.dispatch-row-progress span.done {
  background: #e8f5ee;
  color: #176b47;
}

.dispatch-row-engineer label {
  margin: 0 0 5px;
}

.dispatch-row-engineer select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd7e4;
  border-radius: 7px;
  background: #fff;
  padding: 6px 9px;
  color: #2e4055;
}

.dispatch-row-engineer select:disabled {
  background: #f3f6f9;
  color: #6e7c8e;
}

.dispatch-row-action {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.dispatch-row-action button {
  min-height: 36px;
  padding: 6px 12px;
  white-space: nowrap;
}

.dispatch-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid #dfe6ee;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dispatch-card:hover,
.dispatch-card:focus-visible {
  border-color: #8fb3d9;
  box-shadow: 0 8px 22px rgba(31, 73, 125, .1);
  outline: none;
  transform: translateY(-1px);
}

.dispatch-card header,
.dispatch-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dispatch-card header>div {
  min-width: 0;
}

.dispatch-card header strong {
  display: block;
  overflow: hidden;
  color: #273548;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-card header small {
  display: block;
  margin-top: 3px;
  color: #7b8796;
}

.dispatch-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: #58687b;
  font-size: 12px;
}

.dispatch-card-body p {
  width: 100%;
  margin: 0;
  color: #2f4055;
  font-size: 13px;
}

.dispatch-card footer {
  padding-top: 9px;
  border-top: 1px solid #edf1f5;
}

.dispatch-card footer span {
  color: #66778b;
  font-size: 12px;
}

.dispatch-card footer button {
  min-height: 36px;
  padding: 6px 12px;
}

.dispatch-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  background: #e2e8ef;
}

.dispatch-detail>div {
  min-width: 0;
  padding: 11px 13px;
  background: #fff;
}

.dispatch-detail>div.wide {
  grid-column: 1 / -1;
}

.dispatch-detail span {
  display: block;
  margin-bottom: 3px;
  color: #7a8796;
  font-size: 11px;
}

.dispatch-detail b {
  color: #2b3b4f;
  font-size: 13px;
}

.dispatch-engineer-field {
  display: block;
  margin-top: 14px;
}

.dispatch-engineer-field span {
  display: block;
  margin-bottom: 6px;
  color: #536477;
  font-size: 12px;
}

.dispatch-engineer-field select {
  width: 100%;
}

.dispatch-assign-button {
  width: 100%;
  min-height: 44px;
  margin-top: 13px;
}

.dispatch-current-engineer {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f2f6fa;
  color: #47586b;
}

.onsite-assignment-notice {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #f0c87a;
  border-radius: 11px;
  background: #fffaf0;
  box-shadow: 0 7px 22px rgba(161, 104, 17, .08);
}

.onsite-assignment-notice>header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #f2ddb1;
  background: #fff4d9;
}

.onsite-assignment-notice>header>div {
  display: grid;
  gap: 2px;
}

.onsite-assignment-notice>header b {
  color: #754a08;
  font-size: 15px;
}

.onsite-assignment-notice>header span {
  color: #8b6b35;
  font-size: 12px;
}

.onsite-assignment-notice>header>strong {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #c3770d;
  color: #fff;
}

.onsite-assignment-list {
  display: grid;
}

.onsite-assignment-item {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(190px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid #f3e8d2;
}

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

.onsite-assignment-item b,
.onsite-assignment-item small,
.onsite-assignment-item span {
  display: block;
}

.onsite-assignment-item b {
  color: #3d3a34;
  font-size: 14px;
}

.onsite-assignment-item small,
.onsite-assignment-item span {
  margin-top: 3px;
  color: #796d5d;
  font-size: 11.5px;
}

.onsite-assignment-item button {
  min-height: 40px;
  white-space: nowrap;
}

.onsite-assignment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

@media (max-width: 760px) {
  .dispatch-workspace {
    padding-bottom: 18px;
  }

  .dispatch-hero {
    padding: 14px 15px;
  }

  .dispatch-hero strong {
    font-size: 26px;
  }

  .dispatch-toolbar {
    grid-template-columns: 1fr 110px;
  }

  .dispatch-toolbar input {
    grid-column: 1 / -1;
  }

  .dispatch-list {
    display: flex;
  }

  .dispatch-row {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 13px;
  }

  .dispatch-row-action {
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
  }

  .dispatch-row-action button {
    justify-self: end;
    min-height: 40px;
  }

  .dispatch-detail {
    grid-template-columns: 1fr;
  }

  .dispatch-detail>div.wide {
    grid-column: auto;
  }

  .onsite-assignment-item {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 13px;
  }

  .onsite-assignment-item button {
    width: 100%;
    min-height: 42px;
  }

  .onsite-assignment-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 760px) {
  .task-calendar {
    min-width: 840px;
  }

  .calendar-toolbar {
    position: sticky;
    left: 0;
  }

  .calendar-owner-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .calendar-owner-row select {
    flex: 1 1 220px;
  }
}

.case-measurement-row span {
  color: #77736b;
  font-size: 12px;
}

.customer-lookup-row {
  display: flex;
  gap: 8px;
}

.customer-lookup-row input {
  min-width: 0;
  flex: 1;
}

.customer-master-summary b {
  color: #2e5d4b;
  font-size: 15px;
}

.customer-master-table {
  min-width: 1240px;
}

.customer-master-table td small {
  display: block;
  margin-top: 4px;
  color: #8a867e;
  font-size: 10px;
}

.customer-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f2f0ea;
  color: #6f6a61;
  font-size: 11px;
}

.customer-status.合作中,
.customer-status.已合作 {
  background: #e6f2eb;
  color: #216c4c;
}

.customer-status.跟进中 {
  background: #eaf0f7;
  color: #315f8e;
}

.customer-status.暂停合作 {
  background: #f8e9e9;
  color: #9f3434;
}

.customer-master-cards {
  display: none;
}

.modal.customer-master-mode {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.customer-master-mode .modal-card {
  width: min(980px, 96vw);
  height: auto;
  max-height: calc(100dvh - 48px);
  padding: 22px 26px;
  border-radius: 14px;
}

.customer-detail-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.customer-detail-overview>div {
  padding: 10px;
  border: 1px solid #e7e7e3;
  border-radius: 7px;
  background: #f8f8f6;
}

.customer-detail-overview .wide {
  grid-column: span 6;
}

.customer-detail-overview small {
  display: block;
  color: #8d8980;
  font-size: 10px;
}

.customer-detail-overview b {
  display: block;
  margin-top: 5px;
  color: #44413b;
  font-size: 12px;
}

.customer-detail-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.customer-detail-section {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e5e5e1;
  border-radius: 9px;
}

.customer-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.customer-detail-title h3 {
  margin: 0;
  color: #3d3a35;
  font-size: 14px;
}

.customer-detail-title span {
  color: #918d84;
  font-size: 10px;
}

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

.customer-intention-list article {
  padding: 11px;
  border: 1px solid #e8e6df;
  border-radius: 8px;
  background: #fffefb;
}

.customer-intention-list article>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-intention-list article>div span {
  color: #315f8e;
  font-size: 10px;
}

.customer-intention-list p {
  margin: 7px 0;
  color: #68645c;
  font-size: 12px;
}

.customer-intention-list small {
  color: #8f8b82;
  font-size: 10px;
}

.customer-intention-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #efede7;
  color: #827e75;
  font-size: 10px;
}

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

.customer-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #f0efeb;
  font-size: 11px;
}

.customer-history-row:last-child {
  border-bottom: 0;
}

.customer-history-row span {
  color: #8d8980;
}

@media (max-width: 980px) {
  .record-toolbar.customer-master-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-toolbar.customer-master-filters input {
    grid-column: 1 / -1;
  }

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

  .customer-detail-overview .wide {
    grid-column: span 3;
  }
}

@media (max-width: 760px) {
  .customer-master-table {
    display: none;
  }

  .customer-master-cards {
    display: grid;
    gap: 9px;
    padding: 10px 0;
  }

  .modal.customer-master-mode {
    align-items: flex-end;
    padding: 0;
  }

  .modal.customer-master-mode .modal-card {
    width: 100%;
    max-height: 94dvh;
    padding: 18px 14px;
    border-radius: 16px 16px 0 0;
  }

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

  .customer-detail-overview .wide,
  .customer-intention-list,
  .customer-history-grid {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .case-measurement-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* 测量现场：PC 与手机共用紧凑、清晰的垂直节奏。 */
.onsite-page {
  --onsite-gap: 12px;
  display: grid;
  align-content: start;
  gap: var(--onsite-gap);
}

.onsite-page > * {
  margin-top: 0;
  margin-bottom: 0;
}

.onsite-page .onsite-assignment-notice {
  margin-bottom: 0;
}

.onsite-page .onsite-assignment-notice > header {
  min-height: 48px;
  padding: 9px 14px;
}

.onsite-page .onsite-assignment-notice > header b {
  font-size: 14px;
}

.onsite-page .onsite-assignment-notice > header span {
  font-size: 11px;
}

.onsite-page .onsite-assignment-item {
  padding: 10px 14px;
  gap: 11px 14px;
}

.onsite-page .onsite-assignment-item > div:nth-child(2) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}

.onsite-page .onsite-assignment-item small,
.onsite-page .onsite-assignment-item span {
  margin-top: 0;
}

.onsite-page .onsite-assignment-item button {
  min-height: 38px;
}

.onsite-page .onsite-return-button {
  border-color: #dfc2be;
  background: #fff8f7;
  color: #9d4037;
}

.onsite-page .onsite-return-button:hover {
  border-color: #c9948d;
  background: #fff1ef;
}

.onsite-page .onsite-meta {
  width: 100%;
  max-width: none;
  gap: 11px 14px;
}

.onsite-page .onsite-meta > .field {
  min-width: 0;
}

.onsite-page .onsite-meta > .field > span {
  margin-bottom: 4px;
}

.onsite-page .onsite-date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: stretch;
}

.onsite-page .onsite-date-control input {
  min-width: 0;
}

.onsite-page .onsite-date-control button {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}

.onsite-page .onsite-drop {
  min-height: 150px;
  margin: 0;
  padding: 20px 22px;
}

.onsite-page .onsite-drop b {
  font-size: 18px;
}

.onsite-page .onsite-drop p {
  margin: 4px 0 12px;
}

.onsite-page .onsite-drop > div {
  gap: 6px;
}

.screenshot-editor {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 22, 28, 0.76);
  backdrop-filter: blur(4px);
}

.screenshot-editor.hidden,
.screenshot-selection.hidden {
  display: none;
}

.screenshot-editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1220px, 96vw);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.screenshot-editor-panel > header,
.screenshot-editor-panel > footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
}

.screenshot-editor-panel > header {
  justify-content: space-between;
  border-bottom: 1px solid var(--v2-line, #e7e5df);
}

.screenshot-editor-panel > header > div {
  display: grid;
  gap: 2px;
}

.screenshot-editor-panel > header b {
  font-size: 16px;
}

.screenshot-editor-panel > header span {
  color: #77746c;
  font-size: 12px;
}

.screenshot-editor-body {
  display: grid;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: #20242a;
  place-items: center;
}

.screenshot-editor-canvas {
  position: relative;
  width: min(100%, 1100px);
  max-height: calc(100vh - 190px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  aspect-ratio: var(--screenshot-aspect, 16 / 9);
  background: #111;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.screenshot-editor-canvas > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.screenshot-selection {
  position: absolute;
  border: 2px solid #46d39a;
  background: rgba(70, 211, 154, 0.12);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  pointer-events: none;
}

.screenshot-editor-panel > footer {
  justify-content: space-between;
  border-top: 1px solid var(--v2-line, #e7e5df);
}

.screenshot-editor-panel > footer > span {
  min-width: 0;
  color: #77746c;
  font-size: 12px;
}

.screenshot-editor-panel > footer > div {
  display: flex;
  gap: 8px;
  flex: none;
}

.onsite-page .record-summary {
  margin: 0;
}

.onsite-page #onsiteUploads {
  gap: 6px;
}

.onsite-ongoing {
  overflow: hidden;
  border: 1px solid #cddbd5;
  border-radius: 11px;
  background: #f8fcfa;
}

.onsite-ongoing > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid #dbe9e3;
  background: #eef8f3;
}

.onsite-ongoing > header > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.onsite-ongoing > header b {
  color: #245844;
  font-size: 14px;
}

.onsite-ongoing > header span {
  color: #648174;
  font-size: 11px;
}

.onsite-ongoing > header > strong {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #3c8064;
  color: #fff;
  font-size: 12px;
}

.onsite-ongoing-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.onsite-ongoing-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe5e0;
  border-radius: 9px;
  background: #fff;
}

.onsite-ongoing-item.active {
  border-color: #6fa98f;
  box-shadow: 0 0 0 2px rgba(60, 128, 100, .1);
}

.onsite-ongoing-main {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.onsite-ongoing-main b,
.onsite-ongoing-main small {
  display: block;
}

.onsite-ongoing-main b {
  overflow: hidden;
  color: #33443c;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onsite-ongoing-main small,
.onsite-ongoing-meta span {
  color: #6e7d76;
  font-size: 11px;
}

.onsite-ongoing-main small {
  margin-top: 2px;
}

.onsite-ongoing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
}

.onsite-ongoing-main button {
  min-height: 36px;
  padding-inline: 14px;
  white-space: nowrap;
}

.onsite-ongoing-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px dashed #a9c6b8;
  border-radius: 7px;
  background: #f6fbf8;
  color: #47705e;
  cursor: copy;
}

.onsite-ongoing-drop.dragging {
  border-color: #328260;
  background: #e7f6ee;
  box-shadow: inset 0 0 0 1px rgba(50, 130, 96, .18);
}

.onsite-ongoing-drop b {
  font-size: 12px;
}

.onsite-ongoing-drop span {
  color: #758a80;
  font-size: 10.5px;
}

@media (min-width: 761px) {
  .onsite-page .onsite-assignment-item {
    grid-template-columns: minmax(260px, 1.35fr) minmax(280px, 1fr) auto;
    align-items: center;
  }

  .onsite-page .onsite-assignment-item > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
  }

  .onsite-page .onsite-meta {
    grid-template-columns:
      minmax(220px, 1.8fr)
      repeat(2, minmax(145px, 1fr))
      minmax(320px, 1.35fr);
  }

  .onsite-page .onsite-meta > .wide,
  .onsite-page .onsite-meta > .onsite-date-field {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .onsite-page {
    --onsite-gap: 11px;
  }

  .onsite-page .onsite-assignment-notice > header {
    min-height: 44px;
    padding: 8px 12px;
  }

  .onsite-page .onsite-assignment-notice > header > div {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .onsite-page .onsite-assignment-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 6px 12px;
  }

  .onsite-page .onsite-assignment-item > div:nth-child(2) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
  }

  .onsite-page .onsite-assignment-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 7px;
    margin-top: 1px;
  }

  .onsite-page .onsite-assignment-actions button {
    width: 100%;
    min-height: 40px;
    padding-inline: 8px;
  }

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

  .onsite-page .onsite-meta > .wide,
  .onsite-page .onsite-meta > .onsite-date-field {
    grid-column: 1 / -1;
  }

  .onsite-page .onsite-meta input,
  .onsite-page .onsite-meta select {
    min-height: 40px;
  }

  .onsite-page .onsite-date-control button {
    min-height: 40px;
    padding-inline: 10px;
  }

  .onsite-page .onsite-drop {
    min-height: 176px;
    padding: 13px 12px;
  }

  .onsite-page .onsite-drop b {
    font-size: 17px;
  }

  .onsite-page .onsite-drop p {
    max-width: 280px;
    margin: 4px auto 11px;
    line-height: 1.45;
  }

  .onsite-page .onsite-drop > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 310px);
    gap: 7px;
  }

  .onsite-page .onsite-drop > div button {
    width: 100%;
    min-height: 40px;
    padding-inline: 8px;
  }

  .onsite-ongoing > header {
    padding: 8px 12px;
  }

  .onsite-ongoing > header > div {
    display: grid;
    gap: 1px;
  }

  .onsite-ongoing-list {
    padding: 7px;
  }

  .onsite-ongoing-item {
    gap: 6px;
    padding: 6px;
  }

  .onsite-ongoing-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .onsite-ongoing-main > div:first-child {
    min-width: 0;
  }

  .onsite-ongoing-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .onsite-ongoing-main button {
    grid-column: 2;
    grid-row: 1;
    min-height: 34px;
  }

  .onsite-ongoing-drop {
    display: grid;
    gap: 1px;
    min-height: 38px;
    padding: 5px 8px;
    text-align: center;
  }

  .screenshot-editor {
    padding: 7px;
  }

  .screenshot-editor-panel {
    width: 100%;
    max-height: calc(100vh - 14px);
    border-radius: 12px;
  }

  .screenshot-editor-panel > header,
  .screenshot-editor-panel > footer {
    padding: 10px 12px;
  }

  .screenshot-editor-body {
    padding: 8px;
  }

  .screenshot-editor-canvas {
    max-height: calc(100vh - 160px);
  }

  .screenshot-editor-panel > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .screenshot-editor-panel > footer > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .onsite-page .onsite-assignment-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .onsite-page .onsite-assignment-item > div:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .onsite-page .onsite-assignment-actions {
    grid-column: 2;
    grid-row: 1;
  }

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

  .onsite-page .onsite-meta > .wide,
  .onsite-page .onsite-meta > .onsite-date-field {
    grid-column: 1 / -1;
  }
}

