: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;
}

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

.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) 100px 190px;
  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-row.success {
  border-color: #b8dbc7;
}

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

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

.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-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;
  width: 58px;
  height: 68px;
  place-items: center;
  border: 1.5px solid #8a73db;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

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

.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;
}

.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-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-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.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;
}

.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;
  }
}

