.hg-app.hg-redesign .hg-books-module {
  padding: 0.9rem;
}

.hg-app.hg-redesign .hg-books-module:hover {
  transform: none;
  box-shadow: var(--hg-shadow);
}

.hg-app.hg-redesign .hg-books-module .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
}

.hg-app.hg-redesign .hg-books-module .btn .bi {
  font-size: 0.92rem;
  line-height: 1;
}

.hg-app.hg-redesign .hg-books-module-section {
  padding: 0.65rem 0.2rem;
}

.hg-app.hg-redesign .hg-books-module-section + .hg-books-module-section {
  border-top: 1px solid rgba(77, 102, 111, 0.18);
  margin-top: 0.2rem;
}

.hg-app.hg-redesign .hg-books-hero {
  background: linear-gradient(
    135deg,
    rgba(211, 240, 232, 0.45) 0%,
    rgba(255, 255, 255, 0.75) 42%,
    rgba(243, 250, 248, 0.55) 100%
  );
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.hg-app.hg-redesign .hg-books-toolbar {
  margin-bottom: 0.75rem;
}

.hg-app.hg-redesign .hg-books-table-card .table tbody td:first-child a {
  font-weight: 600;
}

.hg-app.hg-redesign .hg-books-table-card .hg-book-row {
  cursor: pointer;
}

.hg-app.hg-redesign .hg-books-table-card .hg-book-row .hg-book-title-row-link {
  font-weight: 600;
  color: var(--hg-link);
}

.hg-app.hg-redesign .hg-books-table-card .hg-book-row .hg-book-row-actions {
  cursor: default;
}

.hg-app.hg-redesign .hg-books-table-card .hg-book-row .hg-book-row-actions .btn {
  display: inline-flex !important;
  width: auto !important;
  max-width: max-content;
  min-width: 0;
}

.hg-app.hg-redesign .hg-books-table-card .table tbody td {
  vertical-align: top;
}

.hg-app.hg-redesign .hg-books-table-card .table tbody td:not(:first-child) {
  vertical-align: middle;
}

.hg-app.hg-redesign .hg-books-table-card .table-responsive {
  border: 1px solid rgba(77, 102, 111, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background-clip: padding-box;
}

.hg-app.hg-redesign .hg-books-table-card .table .btn.py-0 {
  padding-top: 0.16rem !important;
  padding-bottom: 0.16rem !important;
  line-height: 1.2;
}

.hg-app.hg-redesign .hg-books-table-card .table {
  margin-bottom: 0;
  background: transparent;
}

.hg-app.hg-redesign .hg-books-table-card .table thead th {
  background: rgba(255, 255, 255, 0.76);
}

.hg-app.hg-redesign .hg-books-table-card .table.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(169, 205, 186, 0.12);
}

.hg-app.hg-redesign .hg-books-table-card .table.table-striped > tbody > tr:nth-of-type(even) > * {
  background: rgba(255, 255, 255, 0.56);
}

.hg-app.hg-redesign .hg-books-view-switch .btn {
  min-width: 5.9rem;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
}

.hg-app.hg-redesign .hg-books-view-switch .btn.btn-outline-secondary {
  border-width: 1px;
  border-style: solid;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(77, 102, 111, 0.34);
  color: #355650;
}

.hg-app.hg-redesign .hg-books-view-switch .btn.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(77, 102, 111, 0.44);
  color: #2f4f5f;
}

.hg-app.hg-redesign .hg-books-view-switch .btn:first-child {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

.hg-app.hg-redesign .hg-books-view-switch .btn:last-child {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  margin-left: -1px;
}

.hg-app.hg-redesign .hg-books-view-switch .btn.active {
  background: linear-gradient(135deg, rgba(75, 123, 113, 0.16), rgba(125, 143, 99, 0.12));
  border-color: rgba(77, 102, 111, 0.34);
  color: #355650;
  box-shadow: inset 0 0 0 999px rgba(75, 123, 113, 0.03);
}

.hg-app.hg-redesign .hg-books-view-switch .btn i {
  font-size: 0.92rem;
  line-height: 1;
}

.hg-app.hg-redesign .hg-book-item-card {
  border: 1px solid var(--hg-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 20px rgba(64, 86, 96, 0.08);
}

.hg-app.hg-redesign .hg-book-item-card .card-footer {
  border-top: 1px solid var(--hg-border);
}

.hg-app.hg-redesign .hg-book-item-card .hg-book-card-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.hg-app.hg-redesign .hg-book-item-card .hg-book-card-actions .btn {
  width: auto !important;
}

.hg-app.hg-redesign .hg-title-meta {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.2rem;
}

.hg-app.hg-redesign .hg-title-meta-line {
  font-size: 0.76rem;
  line-height: 1.25;
  color: var(--hg-text-muted);
}

.hg-app.hg-redesign .hg-title-meta-key {
  color: #2f4f5f;
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .hg-app.hg-redesign .hg-books-view-switch .btn {
    min-width: 0;
    flex: 1 1 0;
  }
}

@media (max-width: 575.98px) {
  .hg-app.hg-redesign .hg-books-view-switch .btn {
    min-width: 2.5rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .hg-app.hg-redesign .hg-books-module .hg-btn-label {
    display: none;
  }

  .hg-app.hg-redesign .hg-books-module .btn {
    min-width: 2.4rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .hg-app.hg-redesign .hg-books-table-card .table th,
  .hg-app.hg-redesign .hg-books-table-card .table td {
    white-space: normal;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .hg-app.hg-redesign .hg-books-table-card .hg-col-description,
  .hg-app.hg-redesign .hg-books-table-card .hg-col-discipline,
  .hg-app.hg-redesign .hg-books-table-card .hg-col-session,
  .hg-app.hg-redesign .hg-books-table-card .hg-col-related-exam,
  .hg-app.hg-redesign .hg-books-table-card .hg-col-topic,
  .hg-app.hg-redesign .hg-books-table-card .hg-col-questions {
    display: none;
  }

  .hg-app.hg-redesign .hg-books-table-card .table-responsive {
    overflow: hidden;
  }

  .hg-app.hg-redesign .hg-books-table-card .table tbody td.hg-col-author,
  .hg-app.hg-redesign .hg-books-table-card .table tbody td.hg-book-row-actions {
    vertical-align: middle !important;
  }
}

/* ——— Compact catalog material Details (Books, LabWorks, …) ——— */
.hg-material-details .hg-material-details-heading {
  font-size: 1.15rem;
  line-height: 1.35;
}

.hg-material-details .hg-details-meta dt {
  color: rgba(55, 65, 81, 0.88);
}

.hg-material-file-panel.hg-material-file-panel--compact {
  margin-bottom: 0.5rem;
}

.hg-material-file-panel__label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.hg-material-details .hg-material-details-toolbar .btn {
  flex: 0 0 auto;
}

.hg-material-details .hg-material-details-toolbar form.d-inline {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
}
