.form-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--surface);
  color: var(--text);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-container--narrow {
  max-width: 560px;
}

.form-container--wide {
  max-width: 960px;
}

.report-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.report-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feeder-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.feeder-subnav__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feeder-subnav__group--actions {
  margin-left: auto;
}

.feeder-subnav__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.feeder-subnav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.feeder-subnav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  text-decoration: none;
  border: 1px solid transparent;
}

.feeder-subnav__link:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.feeder-subnav__link.is-active {
  background: #1e40af;
  color: #fff;
}

.feeder-subnav__link.is-active:hover {
  background: #1d4ed8;
  color: #fff;
}

@media (max-width: 640px) {
  .feeder-subnav__group--actions {
    margin-left: 0;
    width: 100%;
  }
}

.save-status {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.save-status--dirty {
  color: #b45309;
}

.save-status--saving {
  color: #64748b;
}

.save-status--saved {
  color: #15803d;
}

.save-status--error {
  color: #b91c1c;
}

.report-section {
  margin-bottom: 1rem;
}

.report-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-heading-row h3 {
  margin: 0;
}

.readiness-panel {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.readiness-block + .readiness-block {
  margin-top: 0.75rem;
}

.readiness-block ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.readiness-block li {
  margin: 0.35rem 0;
}

.readiness-item__message {
  display: block;
  margin-bottom: 0.35rem;
}

.readiness-item__inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.readiness-inline-input {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.88rem;
}

.readiness-fix-btn {
  margin-top: 0.15rem;
}

.readiness-block--critical {
  color: #991b1b;
}

.readiness-block--optional {
  color: #92400e;
}

.pwa-install-modal__panel--wide {
  width: min(100%, 36rem);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
}

.pwa-install-modal__panel--wide .equipment-picker {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.equipment-group {
  margin-bottom: 0.85rem;
}

.equipment-group__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0 0 0.4rem;
}

.equipment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.equipment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.35rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 0.84rem;
  line-height: 1.25;
}

.equipment-chip__link {
  color: inherit;
  text-decoration: none;
}

.equipment-chip__link:hover {
  text-decoration: underline;
}

.equipment-chip__remove {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.equipment-chip__remove:hover {
  color: #b91c1c;
}

.equipment-picker-group + .equipment-picker-group {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.equipment-picker-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.equipment-picker-group__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  color: #0f172a;
}

.equipment-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.equipment-picker-row:last-child {
  border-bottom: none;
}

.equipment-picker-row__meta {
  font-size: 0.82rem;
  color: #64748b;
}

.part-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.part-input-row input {
  flex: 1;
  min-width: 0;
}

.time-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.time-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.time-table th,
.time-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.time-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-align: left;
  white-space: nowrap;
}

.time-table input,
.time-table select {
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
}

.time-table .te-user {
  min-width: 8.5rem;
}

.time-table .te-date {
  min-width: 9rem;
}

.time-table .te-arrival,
.time-table .te-departure {
  min-width: 6rem;
}

.time-table .te-travel,
.time-table .te-km {
  min-width: 4.5rem;
}

.time-table .te-break {
  min-width: 4rem;
}

.time-table td:last-child {
  width: 2rem;
  text-align: center;
}

@media (max-width: 720px) {
  .time-table-wrap {
    overflow-x: visible;
  }

  .time-table {
    min-width: 0;
  }

  .time-table thead {
    display: none;
  }

  .time-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .time-table tr.time-entry-row {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
  }

  .time-table tr.time-entry-row td {
    display: grid;
    grid-template-columns: 6.75rem minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.65rem;
    padding: 0.35rem 0;
    border-bottom: none;
  }

  .time-table tr.time-entry-row td::before {
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
  }

  .time-table tr.time-entry-row td.time-table__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px solid #e2e8f0;
  }

  .time-table tr.time-entry-row td.time-table__actions::before {
    display: none;
  }

  .time-table .te-user,
  .time-table .te-date,
  .time-table .te-arrival,
  .time-table .te-departure,
  .time-table .te-travel,
  .time-table .te-km,
  .time-table .te-break {
    min-width: 0;
  }
}

.form-grid--compact {
  gap: 0.45rem 0.65rem;
}

.form-grid--compact .form-group label {
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}

.form-grid--compact .form-group input {
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
}

.time-entry-row,
.part-row {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #f1f5f9;
}

.time-entry-row:last-child,
.part-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.machine-report-card {
  padding: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 0.65rem;
}

.signature-canvas {
  width: 100%;
  max-width: 600px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  display: block;
}

.signature-preview-wrap {
  cursor: crosshair;
}

.signature-preview-wrap--locked {
  cursor: default;
  pointer-events: none;
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.signature-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
}

.signature-fullscreen.hidden {
  display: none;
}

.signature-fullscreen__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.signature-fullscreen__toolbar h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signature-fullscreen__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.signature-fullscreen__body {
  flex: 1;
  min-height: 0;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signature-fullscreen__canvas {
  flex: none;
  width: 600px;
  height: 160px;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

@media (max-width: 720px) {
  .signature-preview-wrap {
    cursor: pointer;
  }

  .signature-canvas {
    pointer-events: none;
  }

  .signature-fullscreen__body {
    padding: 0.75rem;
  }
}

.list-stack {
  display: grid;
  gap: 0.65rem;
}

.list-card-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.list-card-row .list-card {
  flex: 1;
  min-width: 0;
}

.list-card-row__action {
  align-self: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.list-card {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.list-card:hover {
  border-color: var(--primary);
}

.list-card__date {
  min-width: 6.5rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
  font-size: 0.92rem;
}

.list-card__main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.list-card__main .card-editable-title {
  flex: 1 1 auto;
  min-width: 0;
}

.list-card__meta {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.feeder-list-columns {
  column-width: 11rem;
  column-gap: 1.25rem;
}

.feeder-list-columns > div {
  break-inside: avoid;
  padding: 0.08rem 0;
}

@media (min-width: 640px) {
  .feeder-list-columns {
    column-width: 12rem;
  }
}

@media (min-width: 1024px) {
  .feeder-list-columns {
    column-width: 13rem;
  }
}

.list-card--static {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.list-card--static:hover {
  border-color: #e2e8f0;
}

.list-card__actions {
  margin-top: 0.35rem;
}

.open-point-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.open-points-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fffbeb;
}

.open-points-banner__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.65rem;
}

.open-points-banner__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.open-points-banner__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid #fde68a;
}

.open-points-banner__item:first-child {
  border-top: none;
  padding-top: 0;
}

.open-points-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.open-point-row {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.open-point-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.open-point-row__actions {
  display: flex;
  justify-content: flex-end;
}

.planning-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.planning-row:last-child {
  border-bottom: none;
}

.detail-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.detail-card-link:hover {
  border-color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0b5fff;
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.checkbox-group input {
  width: 1.25rem;
  height: 1.25rem;
  min-height: auto;
}

.checkbox-group label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.form-group-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.visit-type-checkboxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
}

@media (max-width: 720px) {
  .visit-type-checkboxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.install-section,
.logistics-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.install-section h4,
.logistics-section h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.form-actions-right {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.form-actions-left {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.card-editable-title {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.card-editable-title:hover,
.card-editable-title:focus-visible {
  color: #0b5fff;
  text-decoration: underline;
}

.contract-card--editable {
  cursor: default;
}

.contract-card--editable .card-editable-title {
  cursor: pointer;
}

.open-point-card__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.form-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 25;
  margin-left: -2rem;
  margin-right: -2rem;
  margin-bottom: -2rem;
  padding: 1rem 2rem calc(1rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid #dbe3ee;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.btn-primary {
  background: #0b5fff;
  color: white;
}

.btn-primary:hover {
  background: #0847c4;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #fee4e2;
  color: #b42318;
}

.btn-danger:hover {
  background: #fecaca;
}

.form-message {
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  background: #dcfae6;
  color: #0f7b3a;
}

.form-message.error {
  background: #fee4e2;
  color: #b42318;
}

.edit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
}

.edit-tab {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.edit-tab:hover {
  background: #eef2ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.edit-tab.is-active {
  background: #0b5fff;
  border-color: #0b5fff;
  color: #fff;
}

.edit-tab--danger:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.ui-badge--blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.ui-badge--slate {
  background: #e2e8f0;
  color: #334155;
}

.ui-badge--green {
  background: #dcfce7;
  color: #15803d;
}

.ui-badge--amber {
  background: #fef3c7;
  color: #b45309;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.form-hint {
  font-size: 0.85rem;
  color: #64748b;
}

.form-hint {
  font-size: 0.85rem;
  color: #64748b;
}

.form-draft-status {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.form-draft-status--offline {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.form-draft-status--local {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.form-draft-status--pending {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fdba74;
}

.form-draft-status--saved {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.form-draft-status--error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.form-draft-status.hidden {
  display: none;
}

.detail-header {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.detail-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  font-size: 1rem;
  color: #1e293b;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: #0f172a;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #334155;
}

.subsection-title--spaced {
  margin-top: 1.5rem;
}

.detail-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.detail-card:hover {
  border-color: #0b5fff;
  box-shadow: 0 2px 8px rgba(11, 95, 255, 0.1);
}

.badge-primary {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-small {
  background: #0b5fff;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-small:hover {
  background: #0847c4;
}

.btn-small.btn-danger {
  background: #fee4e2;
  color: #b42318;
}

.btn-small.btn-danger:hover {
  background: #fecaca;
}

.btn-link {
  background: none;
  border: 0;
  color: #b42318;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.btn-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.flash-message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #dcfae6;
  color: #0f7b3a;
  font-weight: 600;
}

.danger-zone {
  margin-top: 2.5rem;
  padding: 1.25rem;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff5f5;
}

.danger-zone--compact {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.danger-zone-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
}

.danger-zone--compact .danger-zone-title {
  color: #94a3b8;
}

.danger-zone-text {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: #64748b;
}

.btn-danger--subtle {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  min-height: auto;
  background: #fff;
  color: #b42318;
  border: 1px solid #fecaca;
}

.btn-danger--subtle:hover:not(:disabled) {
  background: #fff5f5;
}

.btn-danger--subtle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: #dcfae6;
  color: #0f7b3a;
}

.status-other {
  background: #fef0c7;
  color: #b54708;
}

.detail-empty {
  color: #64748b;
  margin: 0;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  max-width: 900px;
}

.contact-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.contact-card-header strong {
  font-size: 1rem;
}

.contact-card-role {
  font-size: 0.88rem;
  color: #64748b;
}

.contact-card-line {
  font-size: 0.88rem;
}

.contact-card-line a {
  color: #0b5fff;
  text-decoration: none;
  word-break: break-word;
}

.contact-card-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.contact-card-actions a {
  color: #0b5fff;
  text-decoration: none;
}

.contract-machine-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.contract-machine-list li {
  display: grid;
  grid-template-columns: minmax(4.5rem, 5.5rem) minmax(6rem, 1fr) minmax(5rem, auto);
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 0.84rem;
}

.contract-machine-list__line {
  font-weight: 600;
  color: #334155;
}

.contract-machine-list__model {
  color: #0f172a;
}

.contract-machine-list__serial {
  color: #64748b;
  font-size: 0.8rem;
  text-align: right;
}

#service-contracts-list.contact-list {
  max-width: none;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  #service-contracts-list.contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #service-contracts-list.contact-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#service-contracts-list .contract-card {
  height: 100%;
}

.contract-card-actions {
  display: none;
}

.contract-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.88rem;
  color: #64748b;
}

.machine-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.machine-column {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.machine-column-title {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.machine-column-list {
  display: flex;
  flex-direction: column;
}

.machine-line-row {
  display: block;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #eef2f6;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.machine-line-row:last-child {
  border-bottom: 0;
}

.machine-line-row:hover {
  background: #eff6ff;
}

.machine-line-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.machine-line-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.machine-line-number {
  flex: 0 0 auto;
  min-width: 1.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0b5fff;
}

.machine-line-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.machine-line-brand {
  font-weight: 500;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-line-model {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-line-model-muted {
  color: #64748b;
  font-style: italic;
}

.machine-line-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding-left: calc(1.75rem + 0.5rem);
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.35;
}

.machine-line-serial {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: #475569;
}

.machine-line-type {
  color: #64748b;
}

.machine-line-ip {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.machine-line-header .status-badge {
  flex: 0 0 auto;
  margin-left: auto;
}

.machine-line-details {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.35;
}

.machine-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-left: calc(1.75rem + 0.5rem);
  font-size: 0.78rem;
  color: #64748b;
}

.machine-line-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
  padding-left: calc(1.75rem + 0.5rem);
}

.machine-line-options .tag {
  font-size: 0.72rem;
  padding: 0.12rem 0.4rem;
}

.machine-line-sep {
  color: #cbd5e1;
}

.machine-line-row .status-badge {
  flex: 0 0 auto;
}

.detail-card-link {
  color: #0b5fff;
  text-decoration: none;
}

.detail-card-link:hover {
  text-decoration: underline;
}

.installation-readonly-value {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.installations-section {
  margin-top: 1.5rem;
}

.installations-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.installation-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.installation-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.installation-row-main strong {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.installation-row-meta {
  font-size: 0.88rem;
  color: #64748b;
}

.installation-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-link-action {
  color: #0b5fff !important;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.option-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.option-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.option-card.is-selected {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 4px 12px rgba(11, 95, 255, 0.08);
}

.option-checkbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 0;
}

.option-checkbox input {
  margin-top: 0;
  width: 1rem;
  height: 1rem;
  accent-color: #0b5fff;
  flex: 0 0 auto;
}

.option-checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.option-checkbox-text strong {
  color: #0f172a;
  line-height: 1.2;
  font-size: 0.92rem;
}

.option-card-code {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.option-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.option-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-link-danger {
  color: #b42318;
}

@media (max-width: 640px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.installation-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}

.installation-panel.hidden {
  display: none;
}

.installation-panel h4 {
  margin: 0 0 1rem;
}

#installation-customer-readonly.hidden {
  display: none;
}

#installation-customer-wrap.hidden {
  display: none;
}

.pwa-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.pwa-install-banner.hidden {
  display: none;
}

.pwa-install-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pwa-install-modal.hidden {
  display: none;
}

.pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.pwa-install-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
}

.pwa-install-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.2);
  padding: 1.25rem 1.35rem;
}

.pwa-install-modal__panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.pwa-install-steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
  color: #1a2332;
}

.pwa-install-steps li {
  line-height: 1.4;
}

.options-section,
.credentials-section {
  margin-top: 1.5rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}

.option-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.option-checkbox input {
  margin-top: 0.2rem;
}

.option-checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.option-checkbox-code {
  font-size: 0.8rem;
  color: #64748b;
}

.add-option-form {
  margin-top: 0.5rem;
}

.add-option-grid {
  grid-template-columns: 1fr 2fr auto;
  align-items: end;
}

.add-option-action .btn {
  width: 100%;
}

.detail-subsection {
  margin-top: 1.25rem;
}

.option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.credentials-table-wrap {
  margin-top: 0.35rem;
  overflow-x: auto;
}

.credentials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.credentials-table th,
.credentials-table td {
  padding: 0.5rem 0.65rem;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.credentials-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.credential-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .add-option-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 1.25rem;
  }

  .form-actions--sticky {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    margin-bottom: -1.25rem;
    padding: 0.85rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom));
  }

  .form-actions-right {
    width: 100%;
    gap: 0.75rem;
  }

  .form-actions-right .btn,
  .form-actions-right .btn-small {
    flex: 1 1 0;
    justify-content: center;
  }

  .detail-header,
  .detail-card,
  .machine-column {
    border-radius: 10px;
  }

  .section-title {
    font-size: 1.08rem;
    margin: 1.4rem 0 0.8rem;
  }

  .machine-columns {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .machine-line-row {
    padding: 0.65rem 0.75rem;
  }

  .machine-line-ip {
    font-size: 0.76rem;
  }
}

.repair-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.repair-check-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.65rem 0.45rem;
  background: #fff;
}

.repair-check-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0.2rem 0;
  border: none;
  background: transparent;
}

.repair-check-row__label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repair-check-row__result {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  overflow: hidden;
}

.repair-check-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  color: #445;
  background: #f6f8fb;
  white-space: nowrap;
}

.repair-check-option + .repair-check-option {
  border-left: 1px solid #d7dee8;
}

.repair-check-option:has(input:checked) {
  background: #e8f5ee;
  color: #067647;
}

.repair-check-option--problem:has(input:checked) {
  background: #fdecea;
  color: #b42318;
}

.repair-check-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.repair-check-problem {
  display: none;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid #eef2f6;
}

.repair-check-item.is-problem .repair-check-problem {
  display: block;
}

.repair-check-problem label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.repair-check-problem textarea {
  width: 100%;
  min-height: 3.2rem;
}

.repair-check-photo {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.repair-check-photo .btn input {
  display: none;
}

.repair-check-photo__preview img {
  display: block;
  max-width: 180px;
  max-height: 120px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
}

.form-hint.pass {
  color: #067647;
  font-weight: 600;
}

.form-hint.fail {
  color: #b42318;
  font-weight: 600;
}

.sensor-block {
  margin: 0.75rem 0 1rem;
}

.sensor-block__title {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.95rem;
}

.sensor-measure-wrap,
.sensor-eval-wrap {
  overflow-x: auto;
}

.sensor-measure-table,
.sensor-eval-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
}

.sensor-measure-table th,
.sensor-measure-table td,
.sensor-eval-table th,
.sensor-eval-table td {
  border: 1px solid #d7dee8;
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: middle;
}

.sensor-measure-table th,
.sensor-eval-table th {
  background: #f8fafc;
  font-weight: 600;
}

.sensor-measure-table td:has(.sensor-grid-input) {
  white-space: nowrap;
}

.sensor-letter {
  display: inline-block;
  min-width: 1.1rem;
  font-weight: 700;
  margin-right: 0.35rem;
}

.sensor-grid-input {
  width: 6.5rem;
  min-height: 2.2rem;
  padding: 0.25rem 0.4rem;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.sensor-empty {
  color: #94a3b8;
  text-align: center;
}

.sensor-eval-table__formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.sensor-eval-table .is-ok,
.sensor-eval-table .is-nok {
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.sensor-eval-table .is-ok {
  background: #e8f5ee;
  color: #067647;
}

.sensor-eval-table .is-nok {
  background: #fdecea;
  color: #b42318;
}

.form-container--xl {
  max-width: 1100px;
}

.feeder-tariff-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.feeder-tariff-table {
  width: 100%;
  border-collapse: collapse;
}

.feeder-tariff-table th,
.feeder-tariff-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.feeder-tariff-table input {
  width: 100%;
}

.feeder-tariff-order {
  max-width: 4.5rem;
}

.feeder-tariff-computed {
  white-space: nowrap;
  color: #475569;
}

.feeder-item-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem 0.55rem 0.4rem;
  margin-bottom: 0.45rem;
  background: #f8fafc;
  overflow: hidden;
}

.feeder-item-grid {
  display: grid;
  gap: 0.35rem 0.45rem;
  align-items: end;
}

.feeder-item-grid--delivery {
  grid-template-columns: 1.4rem minmax(4.5rem, 0.7fr) 4rem minmax(7.5rem, 1.2fr) minmax(7rem, 1.1fr) minmax(5rem, 0.9fr) auto;
  grid-template-areas: "nr type size number pa note remove";
}

.feeder-item-grid--repair {
  grid-template-columns: 1.4rem minmax(4.5rem, 0.7fr) 4rem minmax(7rem, 1.1fr) minmax(6.5rem, 1fr) minmax(5.5rem, 0.85fr) 5.2rem auto;
  grid-template-areas: "nr type size number pa action service remove";
}

.feeder-item-nr { grid-area: nr; }
.feeder-item-grid .fi-type { grid-area: type; }
.feeder-item-grid .fi-size { grid-area: size; }
.feeder-item-grid .fi-number { grid-area: number; min-width: 0; }
.feeder-item-grid .fi-pa { grid-area: pa; min-width: 0; }
.feeder-item-grid .fi-note { grid-area: note; min-width: 0; }
.feeder-item-grid .fi-action { grid-area: action; }
.feeder-item-grid .fi-service { grid-area: service; }
.feeder-item-grid .feeder-item-remove { grid-area: remove; }

.feeder-item-nr {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  padding-bottom: 0.4rem;
}

.feeder-item-remove {
  margin-bottom: 1px;
  padding: 0.25rem 0.45rem;
  justify-self: start;
}

.feeder-item-card input,
.feeder-item-card select {
  width: 100%;
  min-width: 0;
  padding: 0.28rem 0.4rem;
  font-size: 0.85rem;
  line-height: 1.2;
}

.feeder-item-grid .fi-number input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.feeder-item-card .form-hint,
.feeder-item-hint {
  margin: 0.2rem 0 0 1.8rem;
  font-size: 0.75rem;
}

.feeder-pa-row {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}

.feeder-pa-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.feeder-pa-row .btn {
  flex: 0 0 auto;
}

.feeder-item-grid label,
.feeder-swap-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
  min-width: 0;
}

.feeder-item-grid label {
  overflow: hidden;
}

.feeder-swap-field {
  margin: 0.25rem 0 0 1.8rem;
  max-width: 16rem;
}

.feeder-parts {
  margin: 0.2rem 0 0 1.8rem;
}

.feeder-parts__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.feeder-part-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(8rem, 1.4fr) 5.5rem auto;
  gap: 0.3rem;
  margin-bottom: 0.2rem;
  align-items: center;
}

.feeder-parts__total {
  font-size: 0.75rem;
  color: #475569;
}

.feeder-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.feeder-add-bottom {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.15rem;
}

.feeder-type-size-summary {
  margin: 0.35rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.feeder-type-size-summary__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.feeder-type-size-summary__head span {
  color: #64748b;
  font-size: 0.8rem;
  white-space: nowrap;
}

.feeder-summary-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  padding: 0.3rem 0;
}

.feeder-summary-type + .feeder-summary-type {
  border-top: 1px solid #e2e8f0;
}

.feeder-summary-type__name {
  min-width: 4.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.feeder-summary-type__name em {
  font-style: normal;
  font-weight: 500;
  color: #64748b;
  margin-left: 0.15rem;
}

.feeder-summary-type__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.feeder-summary-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
}

.feeder-summary-chip__size {
  color: #64748b;
}

.feeder-summary-chip strong {
  font-variant-numeric: tabular-nums;
}

.feeder-totals {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.feeder-totals div {
  display: flex;
  flex-direction: column;
  min-width: 6rem;
}

.feeder-totals span {
  font-size: 0.75rem;
  color: #64748b;
}

.feeder-sticker-scan {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  background: #0f141c;
  color: #e8eef6;
}

.feeder-sticker-scan.hidden {
  display: none;
}

.feeder-sticker-scan__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #1a2130;
  border-bottom: 1px solid #334056;
  flex-shrink: 0;
}

.feeder-sticker-scan__toolbar h2 {
  margin: 0;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
}

.feeder-sticker-scan__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  overflow: auto;
}

.feeder-sticker-scan__video-wrap {
  position: relative;
  flex: 1 1 40%;
  min-height: 140px;
  max-height: 36vh;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  transition: max-height 0.2s ease, min-height 0.2s ease, flex-basis 0.2s ease;
}

.feeder-sticker-scan--confirming .feeder-sticker-scan__video-wrap {
  flex: 0 0 auto;
  min-height: 96px;
  max-height: 22vh;
}

.feeder-sticker-scan--confirming.feeder-sticker-scan--need-1d .feeder-sticker-scan__video-wrap {
  min-height: 160px;
  max-height: 34vh;
  border: 4px solid #4ade80;
  box-shadow: 0 0 0 3px #14532d, 0 0 16px rgba(74, 222, 128, 0.55);
}

.feeder-sticker-scan__video-wrap--need-1d {
  border: 4px solid #4ade80 !important;
  box-shadow: 0 0 0 3px #14532d, 0 0 16px rgba(74, 222, 128, 0.55) !important;
}

.feeder-sticker-scan--confirming .feeder-sticker-scan__reticle {
  display: none !important;
}

.feeder-sticker-scan--confirming .feeder-sticker-scan__manual {
  display: none;
}

.feeder-sticker-scan__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feeder-sticker-scan__reticle {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(74, 222, 128, 0.95);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

/* Bright banner inside confirm panel — not over <video> (Android-safe) */
.feeder-sticker-scan__guide-1d {
  display: block;
  background: #16a34a;
  color: #052e16;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  padding: 0.85rem 0.75rem;
  margin: 0 0 0.65rem;
  border: 3px solid #bbf7d0;
  border-radius: 10px;
  box-shadow: 0 0 0 3px #14532d;
}

.feeder-sticker-scan__guide-1d[hidden] {
  display: none !important;
}

.feeder-sticker-scan__guide-1d span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
}

.feeder-sticker-scan__hint {
  margin: 0;
  font-size: 0.85rem;
  color: #9aa8b8;
}

.feeder-sticker-scan__manual {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.feeder-sticker-scan__manual input {
  flex: 1 1 12rem;
  min-width: 0;
}

.feeder-sticker-confirm {
  background: #1a2130;
  border: 1px solid #334056;
  border-radius: 10px;
  padding: 0.75rem;
  flex-shrink: 0;
}

.feeder-sticker-confirm.hidden {
  display: none;
}

.feeder-sticker-confirm h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.feeder-sticker-confirm__matches {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: #9aa8b8;
}

.feeder-sticker-confirm__matches strong {
  color: #86efac;
}

.feeder-sticker-confirm__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.55rem;
  margin-bottom: 0.65rem;
}

.feeder-sticker-confirm__number,
.feeder-sticker-confirm__pa {
  grid-column: 1 / -1;
}

.feeder-sticker-confirm .form-group {
  margin: 0;
}

.feeder-sticker-confirm label {
  color: #9aa8b8;
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
}

.feeder-sticker-confirm input,
.feeder-sticker-confirm select {
  background: #141a24;
  color: #e8eef6;
  border-color: #334056;
  width: 100%;
  padding: 0.35rem 0.45rem;
  font-size: 0.9rem;
}

.feeder-sticker-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .feeder-item-grid--delivery {
    grid-template-columns: 1.25rem 1fr 4.5rem auto;
    grid-template-areas:
      "nr type size remove"
      "nr number number number"
      "nr pa pa note";
  }

  .feeder-item-grid--repair {
    grid-template-columns: 1.25rem 1fr 4.5rem auto;
    grid-template-areas:
      "nr type size remove"
      "nr number number number"
      "nr pa pa action"
      "nr service service service";
  }

  .feeder-item-grid .fi-number input {
    font-size: 1.05rem;
    padding: 0.45rem 0.5rem;
  }
}

@media (max-width: 700px) {
  .feeder-part-row {
    grid-template-columns: 1fr;
  }
}
