/* Document ISO — company certificates / documents registry */

.docs-iso-module .docs-iso-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 650;
}

.docs-iso-toolbar,
.fleet-docs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.docs-iso-toolbar .docs-iso-search,
.fleet-docs-toolbar #fleet-docs-search {
  margin-left: auto;
  min-width: 12rem;
  padding: 0.4rem 0.6rem;
}

.docs-iso-toolbar select,
.fleet-docs-toolbar select {
  min-width: 10rem;
  padding: 0.4rem 0.55rem;
}

.docs-iso-alerts {
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  background: #fff8f0;
  border: 1px solid #f0d4b8;
  border-radius: 6px;
}

.docs-iso-table .docs-iso-group td {
  background: #f3f4f6;
  font-weight: 650;
  padding: 0.45rem 0.65rem;
}

.docs-iso-group-toggle {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0.15rem 0;
  text-align: left;
  color: inherit;
}

.docs-iso-count {
  font-weight: 500;
  color: #667;
}

.docs-iso-chevron {
  display: inline-block;
  width: 1rem;
  color: #556;
}

.docs-iso-row td {
  vertical-align: middle;
}

.docs-iso-name-link {
  border: 0;
  background: none;
  color: #0b5cab;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.docs-iso-name-link:hover {
  text-decoration: underline;
}

.docs-iso-attach {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.95;
}

button.docs-iso-attach,
button.docs-iso-view-attach {
  border: 0;
  background: #e8f1fb;
  color: #0b5cab;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
}

button.docs-iso-attach:hover,
button.docs-iso-view-attach:hover {
  background: #d5e7f8;
}

.docs-iso-attach--empty {
  opacity: 0.28;
  pointer-events: none;
  background: transparent;
  color: #889;
}

/* Full-page attachment preview (PDF / image) */
.andeeco-attach-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  box-sizing: border-box;
}

.andeeco-attach-viewer {
  width: min(1100px, 100%);
  max-height: 100%;
  margin: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.andeeco-attach-viewer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.andeeco-attach-viewer-heading h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.andeeco-attach-viewer-filename {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #667;
  word-break: break-all;
}

.andeeco-attach-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.andeeco-attach-viewer-body {
  flex: 1;
  min-height: 60vh;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: auto;
}

.andeeco-attach-viewer-img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.andeeco-attach-viewer-pdf {
  width: 100%;
  height: calc(100vh - 8rem);
  min-height: 420px;
  border: 0;
  background: #fff;
  border-radius: 4px;
}

.andeeco-attach-viewer-fallback {
  text-align: center;
  color: #445;
  padding: 2rem 1rem;
  max-width: 28rem;
}

@media (max-width: 720px) {
  .andeeco-attach-viewer-overlay {
    padding: 0.35rem;
  }

  .andeeco-attach-viewer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.docs-expiry--expired,
.docs-expiry--urgent {
  color: #c2410c;
  font-weight: 650;
}

.docs-expiry--warn {
  color: #c2410c;
  font-weight: 600;
}

.docs-expiry-bang {
  display: inline-block;
  margin-left: 0.2rem;
  width: 1rem;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.docs-iso-empty {
  color: #667;
  padding: 1rem 0.75rem !important;
}

.docs-attach-current {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #556;
}

.docs-iso-metrics {
  margin-bottom: 1rem;
}

.fleet-docs-help,
.fleet-ga-help {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #555;
  max-width: 48rem;
}

.fleet-ga-toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.fleet-ga-viewer {
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  background: #fafbfc;
  min-height: 280px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fleet-ga-empty {
  color: #778;
}

.fleet-ga-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
}

.fleet-ga-pdf {
  width: 100%;
  min-height: 70vh;
  border: 0;
  border-radius: 4px;
  background: #fff;
}

.fleet-ga-filename {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: #556;
}

.fleet-ga-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.fleet-ga-page-label {
  margin: 0 0.35rem;
  font-size: 0.85rem;
  color: #445;
}

.fleet-ga-page-btn.active {
  background: var(--sidebar-purple, #6366f1);
  color: #fff;
}

@media (max-width: 720px) {
  .docs-iso-toolbar .docs-iso-search,
  .fleet-docs-toolbar #fleet-docs-search {
    margin-left: 0;
    width: 100%;
  }
}
