.desktop-window[data-app="mechweb"] {
  width: min(1220px, calc(100vw - 180px));
  height: min(800px, calc(100vh - 180px));
}

.desktop-window[data-app="mechweb"] .window-content {
  padding: 0;
  overflow: hidden;
}

.app.mechweb-app {
  height: 100%;
  min-height: 100%;
  color: #e8edf7;
}

.mechweb-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100%;
  min-height: 100%;
  background: linear-gradient(180deg, #252d3c 0%, #1f2633 100%);
  border-radius: 24px;
  overflow: hidden;
}

.mechweb-sidebar {
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(19, 24, 34, 0.96), rgba(26, 32, 43, 0.9));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mechweb-sidebar-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 194, 77, 0.18), rgba(120, 65, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(7, 11, 18, 0.22);
}

.mechweb-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #141821;
  background: linear-gradient(145deg, #ffc24d, #fff0b5);
}

.mechweb-brand-title {
  font-size: 18px;
  font-weight: 700;
}

.mechweb-brand-sub {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(232, 237, 247, 0.72);
}

.mechweb-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mechweb-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 237, 247, 0.44);
  padding: 0 6px;
}

.mechweb-nav-btn {
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: rgba(232, 237, 247, 0.82);
  text-align: left;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.mechweb-nav-btn:hover,
.mechweb-nav-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff7db;
  transform: translateX(2px);
}

.mechweb-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.mechweb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mechweb-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.mechweb-topbar h2 {
  margin: 6px 0 0;
  font-size: 32px;
  font-weight: 700;
  color: #f5f8ff;
}

.mechweb-topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 237, 247, 0.82);
  font-size: 13px;
}

.mechweb-banner {
  margin: 16px 28px 0;
  padding: 14px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.mechweb-banner.is-error {
  background: rgba(255, 106, 106, 0.14);
  border: 1px solid rgba(255, 122, 122, 0.28);
  color: #ffd8d8;
}

.mechweb-banner.is-success {
  background: rgba(78, 213, 160, 0.15);
  border: 1px solid rgba(78, 213, 160, 0.28);
  color: #dbfff0;
}

.mechweb-banner.is-info {
  background: rgba(110, 165, 255, 0.16);
  border: 1px solid rgba(110, 165, 255, 0.28);
  color: #deebff;
}

.mechweb-banner button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.mechweb-content {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 28px 28px;
}

.mechweb-loading,
.mechweb-empty {
  min-height: 220px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  color: rgba(232, 237, 247, 0.76);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mechweb-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ffc24d;
  animation: mechweb-spin 0.9s linear infinite;
}

@keyframes mechweb-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.mechweb-card,
.mechweb-panel,
.mechweb-table-wrap,
.mechweb-note-card {
  border-radius: 22px;
  background: rgba(17, 22, 31, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 28px rgba(6, 10, 18, 0.2);
}

.mechweb-card {
  padding: 20px;
}

.mechweb-card-label {
  font-size: 13px;
  color: rgba(232, 237, 247, 0.58);
}

.mechweb-card-value {
  margin-top: 10px;
  font-size: 40px;
  font-weight: 800;
  color: #fff4d6;
}

.mechweb-card-sub {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(232, 237, 247, 0.68);
}

.mechweb-grid-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.mechweb-panel {
  padding: 22px;
}

.mechweb-panel h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.mechweb-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.mechweb-list-row strong {
  display: block;
}

.mechweb-list-row span {
  color: rgba(232, 237, 247, 0.58);
  font-size: 13px;
}

.mechweb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mechweb-toolbar-left,
.mechweb-toolbar-right,
.mechweb-inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mechweb-btn,
.mechweb-btn-success,
.mechweb-btn-secondary,
.mechweb-btn-danger,
.mechweb-btn-ghost {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.mechweb-btn:hover,
.mechweb-btn-success:hover,
.mechweb-btn-secondary:hover,
.mechweb-btn-danger:hover,
.mechweb-btn-ghost:hover {
  transform: translateY(-1px);
}

.mechweb-btn {
  color: #161a22;
  background: linear-gradient(135deg, #ffc24d, #ffe89c);
  box-shadow: 0 14px 24px rgba(255, 194, 77, 0.2);
}

.mechweb-btn-success {
  color: #fff;
  background: linear-gradient(135deg, #22b8a5, #46d4c4);
  box-shadow: 0 14px 24px rgba(34, 184, 165, 0.24);
}

.mechweb-btn-secondary {
  color: #fff;
  background: linear-gradient(135deg, #7a35ff, #8f50ff);
  box-shadow: 0 14px 24px rgba(122, 53, 255, 0.24);
}

.mechweb-btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff7272, #ff8d8d);
  box-shadow: 0 14px 24px rgba(255, 114, 114, 0.22);
}

.mechweb-btn-ghost {
  color: #dce6f7;
  background: rgba(255, 255, 255, 0.07);
}

.mechweb-btn[disabled],
.mechweb-btn-success[disabled],
.mechweb-btn-secondary[disabled],
.mechweb-btn-danger[disabled],
.mechweb-btn-ghost[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mechweb-vehicle-status-actions {
  margin-top: 16px;
}

.mechweb-search {
  min-width: 240px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: #f4f8ff;
  padding: 12px 14px;
  font: inherit;
}

.mechweb-search::placeholder,
.mechweb-field::placeholder,
.mechweb-textarea::placeholder {
  color: rgba(232, 237, 247, 0.36);
}

.mechweb-table-wrap {
  overflow: hidden;
}

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

.mechweb-table th,
.mechweb-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.mechweb-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 237, 247, 0.56);
  background: rgba(255, 255, 255, 0.025);
}

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

.mechweb-row-title {
  font-weight: 700;
  color: #f5f8ff;
}

.mechweb-row-sub {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(232, 237, 247, 0.58);
}

.mechweb-badge,
.mechweb-status-badge,
.mechweb-note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mechweb-badge-warning {
  background: rgba(255, 194, 77, 0.16);
  color: #ffe49c;
}

.mechweb-badge-danger {
  background: rgba(255, 122, 122, 0.16);
  color: #ffd7d7;
}

.mechweb-badge-ok,
.mechweb-status-badge.status-ok {
  background: rgba(78, 213, 160, 0.18);
  color: #d7fff0;
}

.mechweb-status-badge.status-warning {
  background: rgba(255, 194, 77, 0.16);
  color: #ffe6a7;
}

.mechweb-status-badge.status-danger {
  background: rgba(255, 122, 122, 0.18);
  color: #ffd6d6;
}

.mechweb-note-badge {
  background: rgba(122, 53, 255, 0.18);
  color: #efe4ff;
}

.mechweb-note-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mechweb-employee-hero {
  margin-bottom: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

.mechweb-employee-hero.is-suspended {
  border-color: rgba(255, 122, 122, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 122, 0.08);
}

.mechweb-employee-hero-main {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.mechweb-employee-hero-kicker {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 237, 247, 0.55);
}

.mechweb-employee-hero h3 {
  margin: 0 0 8px;
  font-size: 28px;
  color: #f7f9ff;
}

.mechweb-employee-hero p {
  margin: 0;
  color: rgba(235, 239, 247, 0.76);
}

.mechweb-employee-hero-status {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.mechweb-employee-hero-sub {
  color: rgba(235, 239, 247, 0.72);
  line-height: 1.5;
}

.mechweb-toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mechweb-employee-entry-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.mechweb-employee-entry-card.is-open {
  box-shadow: inset 3px 0 0 rgba(255, 194, 77, 0.7);
}

.mechweb-employee-entry-card.is-closed {
  box-shadow: inset 3px 0 0 rgba(78, 213, 160, 0.7);
}

.mechweb-employee-entry-author {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
  color: #fff4d8;
}

.mechweb-note-title {
  margin: 0;
  font-size: 24px;
  color: #fff4d8;
}

.mechweb-note-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(232, 237, 247, 0.62);
  font-size: 13px;
}

@media (max-width: 900px) {
  .mechweb-employee-hero-status {
    min-width: 0;
    width: 100%;
  }
}

.mechweb-note-body {
  margin: 0;
  color: rgba(235, 239, 247, 0.88);
  line-height: 1.65;
  white-space: pre-wrap;
}

.mechweb-empty-compact {
  min-height: 0;
  padding: 18px 20px;
}

.mechweb-report-card,
.mechweb-history-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.mechweb-report-meta {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: rgba(232, 237, 247, 0.72);
  font-size: 14px;
}

.mechweb-report-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.mechweb-report-group {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mechweb-report-group strong {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(232, 237, 247, 0.64);
}

.mechweb-chip-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mechweb-select-chip-list {
  margin-top: 10px;
}

.mechweb-suggestion-group {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(15, 20, 31, 0.36);
  overflow: hidden;
}

.mechweb-suggestion-group summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 237, 247, 0.82);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mechweb-suggestion-group summary::-webkit-details-marker {
  display: none;
}

.mechweb-suggestion-group summary::after {
  content: "▾";
  font-size: 14px;
  color: rgba(255, 255, 255, 0.54);
  transition: transform 0.16s ease;
}

.mechweb-suggestion-group:not([open]) summary::after {
  transform: rotate(-90deg);
}

.mechweb-suggestion-group .mechweb-select-chip-list {
  padding: 0 14px 14px;
  margin-top: 0;
}

.mechweb-select-chip {
  appearance: none;
  border: 1px solid rgba(255, 208, 107, 0.24);
  background: rgba(255, 208, 107, 0.12);
  color: #ffe4b1;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.mechweb-select-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 208, 107, 0.2);
  border-color: rgba(255, 208, 107, 0.36);
}

.mechweb-select-chip-secondary {
  border-color: rgba(116, 170, 255, 0.22);
  background: rgba(116, 170, 255, 0.12);
  color: #d9e6ff;
}

.mechweb-select-chip-secondary:hover {
  background: rgba(116, 170, 255, 0.2);
  border-color: rgba(116, 170, 255, 0.34);
}

.mechweb-attachment-field {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mechweb-attachment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 237, 247, 0.72);
}

.mechweb-attachment-add {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) auto;
  gap: 10px;
  align-items: center;
}

.mechweb-attachment-add .mechweb-btn-xs {
  min-height: 42px;
}

@media (max-width: 1100px) {
  .mechweb-attachment-add {
    grid-template-columns: 1fr;
  }
}

.mechweb-attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.mechweb-attachment-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 20, 31, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mechweb-attachment-thumb,
.mechweb-attachment-file {
  width: 62px;
  height: 62px;
  border-radius: 14px;
}

.mechweb-attachment-thumb {
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.mechweb-attachment-file {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(126, 87, 255, 0.16);
  border: 1px solid rgba(126, 87, 255, 0.24);
  color: #efe4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mechweb-attachment-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mechweb-attachment-meta strong,
.mechweb-attachment-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mechweb-attachment-meta strong {
  font-size: 14px;
  color: #f4f8ff;
}

.mechweb-attachment-meta span {
  font-size: 12px;
  color: rgba(232, 237, 247, 0.58);
}

.mechweb-attachment-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mechweb-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(72, 219, 171, 0.16);
  border: 1px solid rgba(72, 219, 171, 0.18);
  color: #baffea;
  font-size: 13px;
  font-weight: 700;
}

.mechweb-chip-passed {
  background: rgba(72, 219, 171, 0.16);
  border-color: rgba(72, 219, 171, 0.18);
  color: #baffea;
}

.mechweb-chip-failed {
  background: rgba(255, 132, 132, 0.18);
  border-color: rgba(255, 132, 132, 0.22);
  color: #ffd7d7;
}

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

.mechweb-form {
  display: grid;
  gap: 18px;
}

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

.mechweb-form-span-2 {
  grid-column: 1 / -1;
}

.mechweb-form-grid-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.mechweb-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: rgba(232, 237, 247, 0.8);
}

.mechweb-field,
.mechweb-textarea,
.mechweb-select {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: #f4f8ff;
  padding: 13px 14px;
  font: inherit;
}

.mechweb-textarea {
  min-height: 180px;
  resize: vertical;
}

.mechweb-textarea-compact {
  min-height: 108px;
}

.mechweb-order-sections {
  display: grid;
  gap: 18px;
}

.mechweb-order-section {
  padding: 20px 22px;
}

.mechweb-order-section > h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.mechweb-order-table th,
.mechweb-order-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.mechweb-order-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(232, 237, 247, 0.6);
}

.mechweb-order-table td:first-child {
  color: rgba(232, 237, 247, 0.86);
  font-weight: 600;
}

.mechweb-order-input {
  width: 100%;
  min-width: 88px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: #f4f8ff;
  padding: 10px 12px;
  font: inherit;
}

.mechweb-inline-summary {
  display: grid;
  gap: 10px;
  justify-items: end;
  color: rgba(232, 237, 247, 0.84);
  font-weight: 700;
}

.mechweb-inline-summary span {
  color: rgba(255, 255, 255, 0.96);
}

.mechweb-tuv-group-panel {
  padding: 18px 20px;
}

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

.mechweb-damage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 396px);
  gap: 30px;
  align-items: start;
}

.mechweb-damage-layout-inline {
  margin-top: 14px;
}

.mechweb-damage-stage-panel {
  min-height: 450px;
}

.mechweb-damage-stage {
  position: relative;
  min-height: 450px;
  overflow: visible;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.mechweb-damage-stage-reference {
  --highlight-color: rgba(255, 156, 52, 0.92);
  --vehicle-bodycolor: #ffffff;
  --vehicle-linecolor: #10141c;
  --activeColor: 0 92% 69%;
  width: 100%;
}

.mechweb-damage-stage-reference svg {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  margin: 0 auto;
}

.mechweb-damage-fallback-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 92px;
  grid-template-areas:
    ". underbody ."
    "front top rear"
    ". side .";
  gap: 14px 18px;
  align-items: center;
  justify-items: center;
  width: min(100%, 540px);
  margin: 0 auto;
}

.mechweb-damage-fallback-view {
  position: relative;
  width: 100%;
}

.mechweb-damage-fallback-view-underbody { grid-area: underbody; max-width: 340px; }
.mechweb-damage-fallback-view-top { grid-area: top; max-width: 392px; }
.mechweb-damage-fallback-view-front { grid-area: front; max-width: 104px; }
.mechweb-damage-fallback-view-rear { grid-area: rear; max-width: 104px; }
.mechweb-damage-fallback-view-side { grid-area: side; max-width: 340px; }

.mechweb-damage-fallback-view .mechweb-damage-svg {
  display: block;
  width: 100%;
  height: auto;
}

.mechweb-damage-hotspot {
  position: absolute;
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  opacity: 0.95;
  cursor: pointer;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.mechweb-damage-hotspot:hover {
  background: rgba(255, 156, 52, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 156, 52, 0.3);
}

.mechweb-damage-hotspot.is-selected {
  background: rgba(247, 107, 118, 0.84);
  box-shadow: 0 0 0 1px rgba(247, 107, 118, 0.2);
}

.mechweb-damage-hotspot.is-selected:hover {
  background: rgba(247, 107, 118, 0.92);
}

.mechweb-damage-fallback-grid.is-readonly .mechweb-damage-hotspot {
  pointer-events: none;
}

.mechweb-damage-history-figure {
  --highlight-color: rgba(255, 156, 52, 0.92);
  --vehicle-bodycolor: #ffffff;
  --vehicle-linecolor: #10141c;
  --activeColor: 0 92% 69%;
  margin: 10px 0 14px;
}

.mechweb-damage-history-figure svg {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}

.vehicledmg-clickable {
  cursor: pointer;
  transition: fill 0.18s ease, opacity 0.18s ease;
}

.vehicledmg-clickable:hover {
  fill: var(--highlight-color);
}

.vehicledmg-highlighted {
  fill: var(--highlight-color) !important;
}

.vehicledmg-is_selected {
  fill: hsl(var(--activeColor) / 1) !important;
}

.vehicledmg-st0 {
  fill: none;
  stroke: none;
  stroke-miterlimit: 10;
  stroke-dasharray: 1;
}

.vehicledmg-st1 {
  fill: var(--vehicle-bodycolor);
  stroke: var(--vehicle-linecolor);
  stroke-width: 0.5;
  stroke-miterlimit: 10;
}

.vehicledmg-st2 {
  fill: var(--vehicle-bodycolor);
  stroke: var(--vehicle-linecolor);
  stroke-width: 0.5;
  stroke-miterlimit: 10;
}

.vehicledmg-st3 {
  fill: none;
  stroke: var(--vehicle-linecolor);
  stroke-miterlimit: 10;
}

.vehicledmg-st4 {
  fill: none;
  stroke: var(--vehicle-linecolor);
  stroke-miterlimit: 10;
}

.vehicledmg-st5 {
  fill: var(--vehicle-bodycolor);
  stroke: var(--vehicle-linecolor);
  stroke-miterlimit: 10;
}

.vehicledmg-st6 {
  fill: none;
  stroke: var(--vehicle-linecolor);
  stroke-miterlimit: 10;
}

.vehicledmg-st7 {
  fill: none;
}

.mechweb-damage-note {
  height: 100%;
}

.mechweb-inline-stack {
  display: grid;
  gap: 16px;
}

.mechweb-toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(244, 248, 255, 0.92);
}

.mechweb-toggle-line input {
  width: 18px;
  height: 18px;
}

.mechweb-report-damage-toggle {
  display: none;
}

.mechweb-report-damage-toggle.is-active {
  display: block;
  margin-top: 16px;
}

.mechweb-report-damage-block {
  display: grid;
  gap: 16px;
}

.mechweb-damage-note .mechweb-textarea {
  min-height: 448px;
  height: 448px;
  margin: 0;
}

.mechweb-damage-capture-form {
  gap: 24px;
}

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

.mechweb-damage-actions > button {
  width: 100%;
}

.mechweb-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mechweb-switchline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 120px;
  font-size: 14px;
  color: #d9dfef;
  cursor: pointer;
}

.mechweb-switchline input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.mechweb-switch-slider {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(122, 132, 156, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  flex: 0 0 auto;
}

.mechweb-switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f2f4fb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.mechweb-switchline input[type="checkbox"]:checked + .mechweb-switch-slider {
  background: linear-gradient(135deg, #7b35ff, #aa5cff);
  border-color: rgba(143, 72, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(143, 72, 255, 0.16);
}

.mechweb-switchline input[type="checkbox"]:checked + .mechweb-switch-slider::after {
  transform: translateX(20px);
}

.mechweb-switchline input[type="checkbox"]:disabled + .mechweb-switch-slider {
  opacity: 0.45;
}

.mechweb-switch-text {
  display: inline-block;
  min-width: 78px;
  color: #d9dfef;
}

.mechweb-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.mechweb-detail-card {
  padding: 18px 20px;
}

.mechweb-detail-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(232, 237, 247, 0.46);
}

.mechweb-detail-card p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f7fbff;
  line-height: 1.5;
  white-space: pre-wrap;
}

.mechweb-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.mechweb-pagination span {
  color: rgba(232, 237, 247, 0.62);
  font-size: 13px;
}

.mechweb-confirm {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 4000;
}

.mechweb-confirm.show {
  display: flex;
}

.mechweb-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.62);
  backdrop-filter: blur(8px);
}

.mechweb-confirm-card {
  position: relative;
  width: min(460px, 100%);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, #262f3f, #1f2735);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.mechweb-confirm-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.mechweb-confirm-card p {
  margin: 0;
  color: rgba(232, 237, 247, 0.74);
  line-height: 1.6;
}

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

.mechweb-confirm-actions .mechweb-btn-ghost {
  min-width: 110px;
}

.mechweb-confirm-actions .mechweb-btn-danger,
.mechweb-confirm-actions .mechweb-btn-secondary,
.mechweb-confirm-actions .mechweb-btn {
  min-width: 130px;
}

@media (max-width: 1100px) {
  .mechweb-grid,
  .mechweb-detail-grid,
  .mechweb-form-grid,
  .mechweb-form-grid-wide,
  .mechweb-grid-wide,
  .mechweb-report-groups,
  .mechweb-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mechweb-shell {
    grid-template-columns: 1fr;
  }

  .mechweb-sidebar {
    gap: 14px;
    padding-bottom: 10px;
  }

  .mechweb-nav-group {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .mechweb-nav-label {
    width: 100%;
  }

  .mechweb-content {
    padding: 18px;
  }
}

@media (max-width: 700px) {
  .mechweb-grid,
  .mechweb-detail-grid,
  .mechweb-form-grid,
  .mechweb-form-grid-wide,
  .mechweb-grid-wide,
  .mechweb-report-groups,
  .mechweb-history-grid,
  .mechweb-damage-layout {
    grid-template-columns: 1fr;
  }

  .mechweb-damage-stage {
    min-height: 560px;
  }

  .mechweb-damage-stage-reference {
    min-height: 560px;
  }

  .mechweb-damage-fallback-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "underbody"
      "front"
      "top"
      "rear"
      "side";
    width: min(100%, 392px);
  }

  .mechweb-damage-note .mechweb-textarea {
    min-height: 280px;
    height: 280px;
  }

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

  .mechweb-topbar {
    padding: 20px 18px 14px;
  }

  .mechweb-topbar h2 {
    font-size: 26px;
  }

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

  .mechweb-table {
    min-width: 720px;
  }

  .mechweb-banner {
    margin: 14px 18px 0;
  }
}
