.module-view {
  animation: fadein 0.2s ease;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.module-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.module-head h1 {
  font-size: 25px;
  margin: 7px 0 4px;
  font-weight: 800;
}
.module-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.module-primary {
  height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
}
.module-primary svg {
  width: 16px;
}
.module-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.module-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.stat-icon svg {
  width: 18px;
}
.module-stat div {
  flex: 1;
}
.module-stat strong,
.module-stat small {
  display: block;
}
.module-stat strong {
  font-size: 18px;
  font-weight: 800;
}
.module-stat small {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.module-stat > svg {
  width: 14px;
  color: #a6afbd;
}
.data-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.module-tabs {
  height: 54px;
  display: flex;
  align-items: end;
  gap: 23px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.module-tab {
  height: 54px;
  border: 0;
  background: none;
  color: #7b8799;
  font-size: 10px;
  font-weight: 600;
  padding: 0 2px;
  position: relative;
}
.module-tab.active {
  color: #2563eb;
}
.module-tab.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #2563eb;
}
.table-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.table-search {
  width: 260px;
  /* height: 34px; */
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
}
.table-search svg {
  width: 14px;
  color: #8792a3;
}
.table-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 10px;
  background: transparent;
}
.table-tools > button {
  height: 34px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  padding: 0 10px;
  color: #647086;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.table-tools button svg {
  width: 14px;
}
.table-tools button b {
  background: #e8f0ff;
  color: #2563eb;
  border-radius: 9px;
  padding: 1px 5px;
}
.tools-spacer {
  flex: 1;
}
.table-tools button.square {
  width: 34px;
  padding: 0;
  justify-content: center;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 850px;
}
th {
  text-align: left;
  padding: 11px 16px;
  background: #f8fafc;
  color: #7b8799;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f5;
  font-size: 10px;
  color: #526074;
  white-space: nowrap;
}
tbody tr:hover {
  background: #fafcff;
}
.primary-cell b,
.primary-cell small {
  display: block;
}
.primary-cell b {
  font-size: 10px;
  color: #1d293d;
}
.primary-cell small {
  font-size: 8px;
  color: #8a95a6;
  margin-top: 4px;
}
.data-badge {
  font-size: 8px;
  font-weight: 700;
  border-radius: 10px;
  padding: 4px 7px;
  display: inline-block;
}
.data-badge.red,
.data-badge.urgent {
  background: #fee8e8;
  color: #d83232;
}
.data-badge.orange {
  background: #fff2dc;
  color: #bd6904;
}
.data-badge.green,
.data-badge.safe {
  background: #e5f8ed;
  color: #087d57;
}
.data-badge.blue {
  background: #e7efff;
  color: #2563eb;
}
.data-badge.purple {
  background: #f0eafe;
  color: #7240cf;
}
.data-badge.gray {
  background: #edf0f4;
  color: #647084;
}
.table-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-progress span {
  width: 72px;
  height: 5px;
  background: #e9edf3;
  border-radius: 5px;
}
.table-progress i {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: 5px;
}
.table-progress b {
  font-size: 9px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 12px 16px;
}
.pagination span {
  margin-right: auto;
  color: #8792a2;
  font-size: 9px;
}
.pagination button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 9px;
  color: #667287;
}
.pagination button svg {
  width: 12px;
}
.pagination button.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.pagination button:disabled {
  opacity: 0.4;
}
@media (max-width: 900px) {
  .module-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .module-head {
    align-items: flex-start;
  }
  .module-head h1 {
    font-size: 21px;
  }
  .module-primary {
    width: 40px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }
  .module-tabs {
    overflow: auto;
    gap: 18px;
  }
  .module-tab {
    white-space: nowrap;
  }
  .table-tools {
    flex-wrap: wrap;
  }
  .table-search {
    width: 100%;
  }
  .table-tools .tools-spacer {
    display: none;
  }
  .module-stats {
    gap: 9px;
  }
  .module-stat {
    padding: 12px;
  }
  .module-stat strong {
    font-size: 14px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
  }
  .pagination span {
    display: none;
  }
}
@media (max-width: 420px) {
  .module-stats {
    grid-template-columns: 1fr 1fr;
  }
  .module-stat > svg {
    display: none;
  }
  .module-stat {
    gap: 8px;
  }
  .table-tools > button:nth-of-type(2) {
    display: none;
  }
}
