.awd-app {
  --awd-border: #d7dee8;
  --awd-bg: #f6f8fb;
  --awd-text: #172033;
  --awd-muted: #637083;
  --awd-primary: #176f63;
  --awd-primary-dark: #11554c;
  color: var(--awd-text);
  font-family: inherit;
  max-width: 1120px;
  margin: 0 auto;
}

.awd-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 0 18px;
}

.awd-header h2,
.awd-section h3 {
  margin: 0;
}

.awd-header p,
.awd-muted {
  color: var(--awd-muted);
  margin: 4px 0 0;
}

.awd-section {
  background: #fff;
  border: 1px solid var(--awd-border);
  border-radius: 8px;
  margin: 18px 0;
  padding: 18px;
}

.awd-entry-grid {
  display: grid;
  gap: 18px;
}

.awd-entry-grid .login-username,
.awd-entry-grid .login-password,
.awd-entry-grid .login-remember,
.awd-entry-grid .login-submit {
  margin: 12px 0 0;
}

.awd-entry-grid input[type="text"],
.awd-entry-grid input[type="password"] {
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  box-sizing: border-box;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.awd-worker-select {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.awd-worker-select .awd-button {
  justify-content: flex-start;
}

.awd-worker-bar {
  align-items: center;
  background: #f4faf8;
  border: 1px solid #b8ddd4;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 12px 14px;
}

.awd-worker-bar form {
  margin: 0;
}

.awd-inline-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 14px;
}

.awd-inline-form label {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  gap: 6px;
}

.awd-inline-form input {
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  box-sizing: border-box;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.awd-worker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.awd-worker-list span {
  background: var(--awd-bg);
  border: 1px solid var(--awd-border);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 600;
  padding: 6px 10px;
}

.awd-grid-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.awd-grid-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  gap: 6px;
}

.awd-grid-form input,
.awd-grid-form select,
.awd-grid-form textarea {
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--awd-text);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.awd-grid-form textarea {
  min-height: 96px;
  resize: vertical;
}

.awd-grid-form input[readonly],
.awd-grid-form textarea[readonly],
.awd-grid-form select:disabled {
  background: var(--awd-bg);
  color: #4b5563;
}

.awd-actions,
.awd-signature-wrap {
  grid-column: 1 / -1;
}

.awd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.awd-button {
  align-items: center;
  background: var(--awd-primary);
  border: 1px solid var(--awd-primary);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
}

.awd-button:hover,
.awd-button:focus {
  background: var(--awd-primary-dark);
  color: #fff;
}

.awd-button-secondary {
  background: #fff;
  color: var(--awd-primary);
}

.awd-button-secondary:hover,
.awd-button-secondary:focus {
  background: #eef8f6;
  color: var(--awd-primary-dark);
}

.awd-button-small {
  min-height: 34px;
  padding: 7px 10px;
}

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

.awd-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.awd-table th,
.awd-table td {
  border-bottom: 1px solid var(--awd-border);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.awd-table th {
  background: var(--awd-bg);
  font-weight: 700;
}

.awd-action-head {
  width: 132px;
}

.awd-row-actions {
  display: flex;
  gap: 8px;
}

.awd-row-actions form {
  margin: 0;
}

.awd-icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  color: var(--awd-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 34px;
  min-width: 42px;
  padding: 7px 9px;
  text-decoration: none;
}

.awd-icon-button:hover,
.awd-icon-button:focus {
  background: #f4faf8;
  color: var(--awd-text);
}

.awd-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.awd-delete-button {
  color: #9f1d1d;
  font-size: 16px;
}

.awd-click-row {
  cursor: pointer;
}

.awd-click-row:hover {
  background: #f4faf8;
}

.awd-notice {
  background: #eaf7f3;
  border: 1px solid #9fd6c8;
  border-radius: 6px;
  margin: 0 0 16px;
  padding: 12px 14px;
}

.awd-signature-wrap label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.awd-signature-pad {
  aspect-ratio: 19 / 5;
  background: #fff;
  border: 1px dashed #8a96a8;
  border-radius: 8px;
  display: block;
  height: auto;
  margin-bottom: 10px;
  touch-action: none;
  width: 100%;
}

.awd-signature-preview {
  align-items: center;
  background: #fff;
  border: 1px solid var(--awd-border);
  border-radius: 8px;
  display: flex;
  min-height: 120px;
  padding: 12px;
}

.awd-signature-preview img {
  display: block;
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
}

.awd-repeatable,
.awd-check-form,
.awd-summary,
.awd-checkbox-group {
  grid-column: 1 / -1;
}

.awd-checkbox-group {
  display: grid;
  gap: 10px;
}

.awd-checkbox-group > span {
  font-weight: 700;
}

.awd-checkbox-group label {
  align-items: center;
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  display: flex;
  flex-direction: row;
  font-weight: 500;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.awd-checkbox-group input {
  min-height: auto;
  width: auto;
}

.awd-repeatable-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.awd-repeatable-head h4,
.awd-section h4 {
  margin: 0;
}

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

.awd-summary {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  margin: 14px 0 22px;
}

.awd-summary dt {
  color: var(--awd-muted);
  font-weight: 700;
}

.awd-summary dd {
  margin: 0;
}

.awd-service-list {
  margin: 10px 0 22px;
  padding-left: 22px;
}

.awd-report-sheet {
  background: #fff;
}

.awd-report-title {
  border-bottom: 1px solid var(--awd-border);
  margin-bottom: 18px;
  padding-bottom: 16px;
  text-align: center;
}

.awd-report-title h3 {
  font-size: 28px;
  line-height: 1.15;
  margin: 4px 0;
}

.awd-report-title h3 span {
  font: inherit;
  margin-left: 6px;
}

.awd-report-id {
  color: var(--awd-muted);
  font-size: 14px;
  font-weight: 500;
}

.awd-report-workers {
  color: var(--awd-muted);
  font-size: 14px;
  font-weight: 500;
}

.awd-report-meta {
  display: grid;
  gap: 12px 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0 0 22px;
}

.awd-meta-box {
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.awd-meta-line {
  display: grid;
  gap: 34px;
  grid-template-columns: 120px minmax(0, 1fr);
}

.awd-meta-box:first-child .awd-meta-line {
  gap: 16px;
  grid-template-columns: 92px minmax(0, 1fr);
}

.awd-meta-line span,
.awd-report-info span {
  font-weight: 700;
}

.awd-meta-line strong,
.awd-report-info strong {
  font-weight: 500;
  min-width: 0;
}

.awd-report-info {
  grid-column: 1 / -1;
}

.awd-report-info strong {
  display: inline;
}

.awd-services-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
}

.awd-section .awd-total-services-title {
  margin: 52px 0 10px;
}

.awd-section .awd-day-services-title {
  margin: 50px 0 10px;
}

.awd-services-table {
  background: #fff;
  border: 1px solid var(--awd-border);
  border-collapse: separate;
  border-radius: 6px;
  border-spacing: 0;
  min-width: 620px;
  overflow: hidden;
  width: 100%;
}

.awd-services-table td {
  border: 0;
  border-bottom: 1px solid var(--awd-border);
  min-height: 42px;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

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

.awd-services-table td + td {
  border-left: 1px solid var(--awd-border);
}

.awd-status-table td:not(:first-child) {
  text-align: center;
  width: 160px;
}

.awd-radio-cell {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 32px;
}

.awd-radio-cell input {
  margin: 0;
}

.awd-radio-cell span {
  font-size: 13px;
}

.awd-service-status-form {
  display: grid;
  gap: 18px;
}

.awd-service-status-form input[type="text"],
.awd-service-status-form input[type="date"],
.awd-service-status-form textarea,
.awd-onsite-details input:not([type="checkbox"]):not([type="radio"]),
.awd-onsite-details textarea {
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--awd-text);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.awd-onsite-details {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

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

.awd-measure-scale-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.awd-onsite-box {
  background: #fff;
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  display: grid;
  gap: 12px;
  padding: 14px 12px;
}

.awd-onsite-box h4 {
  margin: 0;
}

.awd-onsite-box p {
  margin: 0;
}

.awd-onsite-full {
  grid-column: 1 / -1;
}

.awd-onsite-full textarea {
  min-height: 96px;
  resize: vertical;
}

.awd-inline-check {
  align-items: center;
  display: inline-flex;
  font-weight: 500;
  gap: 7px;
  line-height: 1.35;
}

.awd-inline-check input {
  margin: 0;
}

.awd-scale-box {
  align-items: start;
  column-gap: 18px;
  grid-template-areas:
    "title weight"
    "checks weight";
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  row-gap: 12px;
}

.awd-scale-box h4 {
  grid-area: title;
}

.awd-compact-field {
  display: grid;
  font-weight: 600;
  gap: 6px;
  grid-area: weight;
  margin-top: 0;
}

.awd-scale-box .awd-compact-field input {
  max-width: 110px;
}

.awd-measure-checks,
.awd-scale-checks {
  display: grid;
  gap: 10px;
}

.awd-scale-checks {
  grid-area: checks;
}

.awd-repeatable-item {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.awd-repeatable-item label {
  min-width: 0;
}

.awd-repeatable-item-locked {
  grid-template-columns: minmax(0, 1fr);
}

.awd-rest-work .awd-repeatable-head {
  margin-bottom: 0;
}

.awd-rest-work .awd-repeatable-items {
  grid-template-columns: 1fr;
}

.awd-date-signature-row {
  align-items: start;
}

.awd-date-signature-row .awd-signature-wrap {
  grid-column: auto;
}

.awd-check-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.awd-check-form label {
  align-items: flex-start;
  border: 1px solid var(--awd-border);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}

.awd-check-form input {
  margin-top: 4px;
}

@media (max-width: 760px) {
  .awd-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .awd-worker-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .awd-inline-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

  .awd-repeatable-items,
  .awd-summary,
  .awd-onsite-row,
  .awd-repeatable-item {
    grid-template-columns: 1fr;
  }

  .awd-scale-box {
    grid-template-areas:
      "title"
      "checks"
      "weight";
    grid-template-columns: 1fr;
  }

  .awd-scale-box h4 {
    grid-column: 1;
  }

  .awd-report-meta {
    grid-template-columns: 1fr;
  }

  .awd-report-info {
    grid-column: 1;
  }

  .awd-meta-line {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .awd-section {
    padding: 14px;
  }
}
