﻿body.modal-open {
  overflow: hidden;
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  width: min(380px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  z-index: 1200;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  border: 1px solid #2a3c63;
  background: rgba(10, 18, 35, 0.97);
  color: #dbe7ff;
  box-shadow: 0 16px 38px rgba(3, 10, 24, 0.55);
  backdrop-filter: blur(8px);
  font-size: 0.92rem;
  line-height: 1.35;
  transform: translateY(-8px);
  opacity: 0;
  animation: toast-in 220ms ease forwards;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, rgba(16, 45, 34, 0.96), rgba(9, 25, 24, 0.96));
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(135deg, rgba(50, 20, 30, 0.96), rgba(26, 11, 18, 0.96));
}

.toast__text {
  flex: 1;
  padding-top: 1px;
}

.toast__close {
  border: none;
  background: transparent;
  color: #a9bcdf;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 6px;
}

.toast__close:hover {
  color: #fff;
  background: rgba(127, 145, 173, 0.22);
}

.toast.is-hiding {
  animation: toast-out 200ms ease forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.modal-backdrop.open {
  display: flex;
}

#defect-detail-attachments-backdrop.open,
#defect-detail-history-backdrop.open,
#nc-attachments-backdrop.open,
#nc-history-backdrop.open,
#nc-comments-backdrop.open {
  z-index: 1060;
}

#camera-modal-backdrop.open {
  z-index: 1070;
}

.modal {
  background: #121726;
  border: 1px solid #1f2533;
  border-radius: 12px;
  width: min(520px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: grid;
  gap: 16px;
  color: #e2e8f0;
  min-width: 0;
  overflow-x: hidden;
}

.modal h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.modal label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: #cbd5f5;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #293042;
  background: #0f1115;
  color: #f8fafc;
}

.modal textarea {
  min-height: 80px;
}

.reviewer-editor {
  display: grid;
  gap: 10px;
}

.assignee-select-hidden {
  display: none;
}

.reviewer-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  align-items: center;
}

.reviewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(30, 58, 138, 0.26);
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 600;
}

.reviewer-chip-remove {
  border: none;
  background: transparent;
  color: #bfdbfe;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 6px;
}

.reviewer-chip-remove:hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.25);
}

.reviewer-list {
  max-height: min(42vh, 340px);
  overflow: auto;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  background: rgba(7, 13, 24, 0.82);
  padding: 6px;
  display: grid;
  gap: 6px;
}

.reviewer-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.reviewer-list-item:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(30, 58, 138, 0.2);
}

.reviewer-list-item.is-selected {
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(30, 64, 175, 0.26);
}

.reviewer-list-item input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.reviewer-list-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.reviewer-list-name {
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.reviewer-list-email {
  color: #9db0d8;
  font-size: 0.8rem;
  line-height: 1.35;
  word-break: break-word;
}

.reviewer-list-empty {
  padding: 10px;
  border-radius: 10px;
  color: #9db0d8;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.3);
}

.assignee-row {
  display: flex;
  justify-content: flex-end;
}

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

.assignee-actions .placeholder {
  margin: 0;
}

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

.btn-secondary {
  background: transparent;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.btn-secondary:hover {
  border-color: #60a5fa;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-compact {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-primary[disabled],
.btn-secondary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.placeholder {
  color: #9db0d8;
}

.form-error {
  color: #f87171;
  min-height: 1.4em;
  font-size: 0.85rem;
}

.attachment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 8px;
}

.defect-view-modal {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: linear-gradient(160deg, rgba(11, 22, 49, 0.98), rgba(4, 13, 33, 0.98));
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.defect-create-modal {
  width: min(580px, 95vw);
}

.defect-view-header {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.defect-view-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.defect-view-chips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.defect-view-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(51, 65, 85, 0.3);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.defect-view-chip.compliance-policy-chip,
.nc-chip.compliance-policy-chip,
.attachment-compliance-badge {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.38);
  color: #fde68a;
}

.defect-view-chip.compliance-policy-chip,
.nc-chip.compliance-policy-chip {
  max-width: 100%;
  text-align: left;
  text-transform: none;
  white-space: normal;
}

.chip-identified {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(51, 65, 85, 0.3);
}

.chip-pending {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(30, 64, 175, 0.28);
  color: #bfdbfe;
}

.chip-approved {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(6, 95, 70, 0.26);
  color: #a7f3d0;
}

.chip-rejected,
.chip-nc-open {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.3);
  color: #fecaca;
}

.chip-nc-closed {
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(51, 65, 85, 0.3);
  color: #e2e8f0;
}

.defect-view-meta {
  color: #c8d8f6;
  font-size: 0.9rem;
  line-height: 1.45;
}

.defect-view-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.defect-view-field {
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}

.defect-view-field:has(.defect-card-actions) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}

.defect-view-field.nc-title-field {
  grid-column: 1 / -1;
}

.defect-view-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  color: #9fb3da;
  font-weight: 700;
}

.defect-view-value {
  font-size: 0.95rem;
  color: #f8fafc;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.defect-view-value.is-comment {
  color: #dbe7f7;
  font-weight: 400;
  line-height: 1.5;
}

.classification-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(96, 165, 250, 0.38);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.defect-card-actions {
  display: flex;
  justify-content: flex-end;
  grid-row: 1 / span 2;
  grid-column: 2;
}

.defect-card-actions .btn-compact {
  white-space: nowrap;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
}

.attachment-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(80px, 0.45fr) minmax(90px, 0.55fr) minmax(170px, 1fr) minmax(220px, 1.15fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.38);
  min-width: 920px;
  padding: 10px 12px;
}

.attachment-list-head {
  color: #9fb3da;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.attachment-list-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.attachment-list-name {
  color: #dbeafe;
  font-weight: 700;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.attachment-list-name:hover {
  color: #ffffff;
  text-decoration: underline;
}

.attachment-list-meta {
  color: #cbd5e1;
  font-size: 0.9rem;
  white-space: nowrap;
}

.attachment-compliance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.attachment-compliance-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.attachment-upload-policy-note {
  display: none;
  margin: 6px 0 0;
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.attachment-upload-policy-note.has-policy {
  display: block;
}

.attachment-format-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 999px;
  color: #bfdbfe;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.defect-view-section {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.56);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.defect-view-section h4 {
  margin: 0;
  font-size: 1rem;
}

.defect-detail-tab-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
  margin-bottom: 2px;
}

.defect-detail-tab-btn {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(12, 18, 32, 0.88);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.defect-detail-tab-btn:hover {
  border-color: rgba(96, 165, 250, 0.75);
  color: #dbeafe;
}

.defect-detail-tab-btn.active {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.85);
  color: #fff;
}

.defect-detail-tab-panel {
  display: none;
  gap: 12px;
}

#defect-detail-form .defect-detail-tab-panel.active,
.defect-view-columns.defect-detail-tab-panel.active {
  display: grid;
}

.defect-detail-card {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.56);
  padding: 10px;
  display: grid;
  gap: 8px;
}

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

.defect-detail-control {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: #c4d4f3;
}

.defect-detail-control input,
.defect-detail-control select,
.defect-detail-control textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(8, 12, 21, 0.9);
}

.defect-detail-control textarea {
  min-height: 96px;
  line-height: 1.45;
}

.defect-detail-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(59, 130, 246, 0.18);
  padding-top: 10px;
  margin-top: 2px;
}

.defect-detail-actions-left,
.defect-detail-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.defect-detail-actions-right {
  justify-content: flex-end;
}

.defect-view-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.defect-view-section-header h4 {
  margin: 0;
  line-height: 1.2;
}

#defect-detail-files-summary,
#defect-detail-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

#defect-detail-files-summary .btn-secondary,
#defect-detail-history-summary .btn-secondary {
  margin-left: auto;
}

#nc-comments-summary,
#nc-files-summary,
#nc-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

#nc-comments-summary .btn-secondary,
#nc-files-summary .btn-secondary,
#nc-history-summary .btn-secondary {
  margin-left: auto;
}

.defect-view-section.history-panel {
  display: none;
}

.defect-view-section.history-panel.open {
  display: grid;
}

#defect-detail-attachments,
#nc-view-attachments,
#defect-detail-reviews {
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}

.approval-summary {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
  display: grid;
  gap: 6px;
}

.approval-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 32, 56, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.35);
  overflow: hidden;
}

.approval-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.approval-comments {
  display: grid;
  gap: 8px;
}

.approval-comment {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 8px;
}

.nc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 10px;
  min-width: 0;
}

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

.nc-header-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.nc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(51, 65, 85, 0.3);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nc-chip-closed {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.3);
  color: #fecaca;
}

.nc-chip-secondary {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(30, 58, 138, 0.25);
  color: #bfdbfe;
}

.nc-tab-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nc-tab-btn {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(12, 18, 32, 0.88);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  cursor: pointer;
}

.nc-tab-btn.active {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.85);
  color: #fff;
}

.nc-tab-panel {
  display: none;
  gap: 12px;
}

.nc-tab-panel.active {
  display: grid;
}

.nc-accordion {
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 10px;
  background: rgba(12, 18, 30, 0.46);
  overflow: hidden;
}

.nc-accordion summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nc-accordion summary::-webkit-details-marker {
  display: none;
}

.nc-accordion summary::before {
  content: "▸";
  color: #93c5fd;
  transition: transform 0.15s ease;
}

.nc-accordion[open] summary::before {
  transform: rotate(90deg);
}

.nc-accordion-content {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.nc-quality-stack,
.nc-quality-create-block,
.nc-description-card {
  display: grid;
  gap: 8px;
}

.nc-quality-create-block,
.nc-description-card {
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.28);
  min-width: 0;
  max-width: 100%;
}

.nc-description-value {
  color: #e2e8f0;
  line-height: 1.45;
  white-space: pre-wrap;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quality-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.34);
  align-items: center;
}

.quality-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quality-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quality-item-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  align-self: auto;
  margin-top: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.45);
  background: rgba(30, 58, 138, 0.2);
  color: #bfdbfe;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: capitalize;
}

.nc-attachment-folder {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
  margin-top: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.nc-attachment-folder-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #bfdbfe;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.attachment-pill,
#defect-view-attachments a,
#nc-view-attachments a,
#defect-detail-attachments a,
#nc-attachments-panel a,
#nc-history-summary a,
#nc-view-history a {
  color: #93c5fd;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(15, 23, 42, 0.6);
  margin: 4px 6px 0 0;
  text-decoration: none;
}

.attachment-pill:hover,
#defect-view-attachments a:hover,
#nc-view-attachments a:hover,
#defect-detail-attachments a:hover,
#nc-attachments-panel a:hover,
#nc-history-summary a:hover,
#nc-view-history a:hover {
  color: #e0f2fe;
  border-color: rgba(59, 130, 246, 0.65);
}

.camera-modal {
  max-width: 520px;
  width: min(520px, 92vw);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.camera-preview {
  width: 100%;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid rgba(59, 130, 246, 0.2);
  overflow: hidden;
}

.camera-preview video {
  width: 100%;
  height: auto;
  display: block;
}

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

@media (max-width: 820px) {
  .defect-view-fields,
  .defect-view-columns {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .toast-stack {
    right: 12px;
    left: 12px;
    width: auto;
  }
}
