.custody-panel,
.sheet-panel {
  padding: 24px;
}
.collaborator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  padding: 20px 0;
}
.collaborator-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 22px;
  border: 1px solid var(--line, #dce7e0);
  border-radius: 22px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(233, 246, 239, 0.6)
  );
  box-shadow: 0 10px 30px #143e3010;
  cursor: pointer;
  color: inherit;
}
.collaborator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 32px #143e3020;
}
.collaborator-card strong,
.collaborator-card small {
  display: block;
}
.collaborator-card small {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.assignment-count {
  margin-left: auto;
  font-size: 28px;
  text-align: right;
  color: #176340;
}
.assignment-count small {
  font-size: 11px;
}
.custody-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.custody-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.custody-slot {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #d7e5dc;
  background: #f6faf7;
}
.custody-slot.available {
  border-style: dashed;
  opacity: 0.8;
}
.custody-slot.occupied {
  background: linear-gradient(135deg, #e8f5ec, #ffffff);
  border-color: #aed5bc;
}
.custody-slot .btn {
  margin-top: auto;
}
.custody-history {
  margin-top: 24px;
}
.custody-history p {
  padding: 14px 0;
  border-bottom: 1px solid #dce7df;
}
.transfer-list {
  display: grid;
  gap: 12px;
  padding: 18px 0;
}
.sheet-filters,
.sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.sheet-filters input {
  min-width: 220px;
  flex: 1;
}
.sheet-filters input,
.sheet-filters select,
.sheet-view-settings input,
.sheet-view-settings select {
  border: 1px solid #cddfd2;
  border-radius: 10px;
  padding: 10px;
  background: #ffffffb0;
  color: #163d2d;
}
.sheet-view-settings {
  padding: 12px 0;
  margin-bottom: 12px;
}
.sheet-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
}
.sheet-scroll {
  overflow: auto;
  max-height: 64vh;
  border: 1px solid #cbded2;
  border-radius: 16px;
  background: #ffffffa8;
}
.sheet-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 13px;
}
.sheet-table th,
.sheet-table td {
  padding: 0;
  border-right: 1px solid #e2eae5;
  border-bottom: 1px solid #e2eae5;
  white-space: nowrap;
}
.sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e5f1e9;
  padding: 14px 16px;
  color: #234e37;
}
.sheet-table tr > th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #eaf2ed;
  padding: 12px;
  min-width: 40px;
  text-align: center;
}
.sheet-table thead th:first-child {
  z-index: 3;
}
.sheet-table td input,
.sheet-table td select {
  width: 100%;
  min-width: 170px;
  border: 0;
  border-radius: 0;
  padding: 13px 14px;
  background: transparent;
  outline-offset: -2px;
  color: inherit;
  font: inherit;
}
.sheet-table td input:focus,
.sheet-table td select:focus {
  outline: 2px solid #278558;
  background: #edf9f0;
}
.sheet-table td span {
  display: block;
  padding: 13px 14px;
  color: #526b5b;
}
.sheet-table .serial-pending {
  background: #fff7db;
}
.sheet-table tr:hover td {
  background-color: #e4f2e755;
}
.sheet-toolbar #sheet-dirty {
  margin-left: auto;
  font-size: 13px;
  color: #38754d;
}
.sheet-panel[data-dirty="true"] {
  border-color: #73af88;
}
.sheet-view-settings summary,
.custody-history summary {
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 700px) {
  .custody-panel,
  .sheet-panel {
    padding: 14px;
  }
  .sheet-scroll {
    max-height: 60vh;
  }
  .sheet-toolbar #sheet-dirty {
    margin-left: 0;
  }
  .collaborator-cards {
    grid-template-columns: 1fr;
  }
}
