.documentation-page .stats-title h1 {
  text-align: left;
}

.docs-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.docs-summary-grid article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #8fa9ba;
  border-radius: 6px;
  background: linear-gradient(135deg, #102f5e 0%, #0f7789 100%);
  color: #fff;
  box-shadow: 0 1px 5px rgba(13, 37, 58, 0.14);
}

.docs-summary-grid span,
.docs-filter-head p,
.docs-card-head p {
  color: #d8eef4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-summary-grid strong {
  font-size: 32px;
  line-height: 1;
}

.docs-filter-card,
.docs-card {
  min-width: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #8fa9ba;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(13, 37, 58, 0.12);
}

.docs-filter-head,
.docs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: linear-gradient(135deg, #0b2d5a 0%, #12446f 70%, #0f7789 100%);
  color: #fff;
}

.docs-filter-head h2,
.docs-card-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-filter-head p,
.docs-card-head p {
  margin: 3px 0 0;
}

.docs-filter-actions {
  display: flex;
  gap: 8px;
}

.docs-filter-actions button {
  min-height: 36px;
  border: 1px solid #fff;
  border-radius: 6px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 900 12px Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.docs-filter-actions button:last-child {
  border-color: #f3a334;
  background: #f3a334;
  color: #07111f;
}

.docs-filter-card.collapsed .docs-toolbar {
  display: none;
}

#toggleDocFilters {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.2);
}

.docs-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
}

.docs-toolbar label,
.documentation-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #344f62;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-toolbar input,
.docs-toolbar select,
.documentation-form input,
.documentation-form select,
.documentation-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #aebfcb;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: #07111f;
  font: 800 13px Arial, Helvetica, sans-serif;
}

.docs-search-field {
  grid-column: 1 / -1;
}

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

.docs-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.docs-table th,
.docs-table td {
  border: 1px solid #b8c8d6;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.docs-table th {
  background: #d8eaf2;
  color: #102f5e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-table tbody tr {
  cursor: pointer;
}

.docs-table tbody tr:hover {
  background: #edf8fa;
}

.docs-table tbody tr.docs-group-row,
.docs-table tbody tr.docs-group-row:hover {
  background: linear-gradient(135deg, #102f5e 0%, #0f7789 100%);
  color: #fff;
  cursor: default;
}

.docs-group-row td {
  border-color: #102f5e !important;
  padding: 8px 12px !important;
}

.docs-group-title {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-group-count {
  display: inline-block;
  margin-left: 10px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f3a334;
  color: #07111f;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-title-cell {
  min-width: 220px;
  max-width: 380px;
  color: #07111f;
  font-weight: 900;
  line-height: 1.35;
  white-space: normal !important;
}

.docs-no-cell {
  color: #102f5e;
  font-weight: 900;
  text-align: center !important;
}

.docs-type-cell,
.docs-fleet-cell,
.docs-revisions-cell {
  line-height: 1.35;
}

.docs-type-cell,
.docs-fleet-cell {
  min-width: 72px;
}

.docs-revisions-cell {
  min-width: 220px;
  max-width: 430px;
  white-space: normal !important;
}

.docs-type-cell,
.docs-fleet-cell {
  color: #102f5e;
  font-weight: 900;
}

.docs-revision-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.docs-revision-list li {
  color: #07111f;
  font-weight: 800;
}

.docs-empty-inline {
  color: #536b7a;
  font-weight: 900;
}

.docs-table tbody tr.review-warning-row {
  background: #fff8df;
}

.docs-table tbody tr.review-warning-row:hover {
  background: #ffefbd;
}

.docs-table tbody tr.review-critical-row {
  background: #ffe8cf;
}

.docs-table tbody tr.review-critical-row:hover {
  background: #ffd7a8;
}

.docs-table tbody tr.review-overdue-row {
  background: #ffe6e4;
}

.docs-table tbody tr.review-overdue-row:hover {
  background: #ffd1ce;
}

.docs-empty {
  padding: 28px !important;
  color: #536b7a;
  font-size: 14px;
  font-weight: 900;
  text-align: center !important;
}

.documentation-modal-panel {
  width: min(920px, 100%);
  max-height: min(92vh, 800px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

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

.documentation-title-field,
.documentation-review-field,
.documentation-revisions-field {
  grid-column: 1 / -1;
}

.documentation-form textarea,
.revision-input {
  min-height: 130px;
  line-height: 1.45;
  resize: vertical;
}

.documentation-revisions-field {
  display: grid;
  gap: 10px;
}

.revision-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #344f62;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.revision-list-head button,
.revision-delete {
  min-height: 36px;
  border: 1px solid #0f7789;
  border-radius: 6px;
  padding: 0 12px;
  background: #0f7789;
  color: #fff;
  font: 900 12px Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.revision-list {
  display: grid;
  gap: 8px;
}

.revision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.revision-input {
  min-height: 72px !important;
}

.revision-delete {
  border-color: #9c2f2a;
  background: #fff;
  color: #9c2f2a;
}

#documentationModalStatus {
  flex: 1 1 auto;
  color: #536b7a;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.documentation-delete-row {
  border: 1px solid #9c2f2a !important;
  background: #fff !important;
  color: #9c2f2a !important;
}

@media (max-width: 1200px) {
  .docs-toolbar,
  .documentation-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .docs-summary-grid,
  .docs-toolbar,
  .documentation-form,
  .revision-row {
    grid-template-columns: 1fr;
  }

  .docs-filter-head,
  .docs-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .docs-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .docs-table {
    min-width: 100%;
  }
}
