/* AMC Training v0.6.0: curriculum overview and compact mobile records. */

/* Keep the v0.5.0 type sizes while restoring emphasis to module names. */
.records-panel .module-label { font-weight: 600; }
.module-card-title h3,
.module-detail-title h2 { font-weight: 700; }

.login { grid-template-rows: 1fr auto; }
.login-story .login-division {
  text-transform: none;
  letter-spacing: .5px;
  line-height: 1.7;
}
.login-copyright {
  grid-column: 1 / -1;
  padding: 20px 24px;
  background: #fafcfb;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.training-overview { min-width: 0; }
.overview-controls { margin-bottom: 22px; overflow: hidden; }
.overview-controls .filters { border-radius: 12px 12px 0 0; }
.overview-status-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px 22px;
}
.overview-status-filters .overview-filter {
  min-height: 40px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}
.overview-status-filters .overview-filter.active,
.overview-status-filters .overview-filter[aria-pressed="true"] {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  font-weight: 650;
}
.overview-filter-count {
  margin-left: 4px;
  opacity: .8;
  font-variant-numeric: tabular-nums;
}
.overview-group { overflow: hidden; margin-bottom: 18px; }
.overview-group-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 17px 22px;
  list-style: none;
  cursor: pointer;
  background: #fff;
}
.overview-group-summary::-webkit-details-marker { display: none; }
.overview-group-summary:hover { background: #f7fbf9; }
.overview-group-summary:focus-visible {
  outline: 3px solid #6bbfa9;
  outline-offset: -3px;
}
.overview-group-name {
  min-width: 0;
  color: var(--green);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.overview-group-total {
  margin-left: auto;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.overview-group[open] > .overview-group-summary {
  border-bottom: 1px solid var(--line);
}
.overview-group[open] > .overview-group-summary .disclosure-arrow {
  transform: rotate(90deg);
}
.overview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.overview-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  background: #fafcfb;
  padding: 11px 7px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.overview-table td {
  padding: 16px 7px;
  border-bottom: 1px solid #e9efec;
  line-height: 1.6;
  vertical-align: middle;
}
.overview-table tbody th {
  padding: 16px 7px;
  border-bottom: 1px solid #e9efec;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.overview-table tbody tr:last-child td,
.overview-table tbody tr:last-child th { border-bottom: 0; }
.overview-table tbody tr:hover { background: #fcfdfc; }
.overview-table th:first-child,
.overview-table td:first-child {
  width: 32%;
  text-align: left;
  padding-left: 22px;
}
.overview-table th:nth-child(2) { width: 8%; }
.overview-table th:nth-child(3),
.overview-table th:nth-child(4) { width: 13%; }
.overview-table th:nth-child(5) { width: 19%; }
.overview-table th:last-child,
.overview-table td:last-child { width: 15%; padding-right: 22px; }
.overview-item-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.overview-item-title strong { font-size: 13px; font-weight: 700; }
.overview-item-title .advanced-badge { font-weight: 400; }
.overview-count { font-size: 16px; font-weight: 650; }
.overview-completed { color: var(--green); }
.overview-withdrawal { color: #91661b; }
.overview-zero { color: var(--muted); font-weight: 400; }
.overview-last-date {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.overview-table .overview-last-date { white-space: nowrap; }
.overview-records-action.btn {
  min-height: 40px;
  padding: 7px 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}
.overview-records-action.btn:disabled {
  cursor: default;
  color: var(--muted);
  background: transparent;
  opacity: .75;
  font-weight: 400;
}
.overview-mobile-items { display: none; }
.compact-record-list { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 1121px) {
  .overview-table th { font-size: 11px; padding: 12px; }
  .overview-table td { padding: 17px 12px; }
  .overview-table tbody th { padding: 17px 12px; }
  .overview-table .overview-item-title strong { font-size: 14px; }
  .overview-table th:first-child,
  .overview-table td:first-child { width: 36%; }
  .overview-table th:nth-child(3),
  .overview-table th:nth-child(4) { width: 12%; }
  .overview-table th:nth-child(5) { width: 17%; }
}

@media (max-width: 760px) {
  .login { display: flex; flex-direction: column; }
  .login-main { flex: 1 0 auto; }
  .login-copyright { margin-top: auto; padding: 18px 16px; font-size: 10px; }
  .login-story .login-division { font-size: 9px; letter-spacing: .3px; }

  .overview-controls { margin-bottom: 18px; }
  .overview-status-filters { padding: 12px 14px; gap: 7px; }
  .overview-status-filters .overview-filter {
    padding: 8px 10px;
    font-size: 11px;
    white-space: normal;
  }
  .overview-filter-count { margin-left: 2px; }
  .overview-group {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    margin-bottom: 17px;
  }
  .overview-group-summary {
    gap: 8px;
    min-height: 49px;
    padding: 13px 1px;
    background: transparent;
    border-top: 1px solid var(--line);
  }
  .overview-group-summary:hover { background: #f0f6f3; }
  .overview-group[open] > .overview-group-summary { border-bottom: 0; }
  .overview-group-name { font-size: 16px; }
  .overview-group-total { font-size: 10px; }
  .overview-table { display: none; }
  .overview-mobile-items { display: block; }
  .overview-item {
    padding: 15px 13px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    margin-bottom: 10px;
    min-width: 0;
  }
  .overview-item-title { gap: 5px 7px; }
  .overview-item-title strong { font-size: 14px; line-height: 1.5; }
  .overview-item-title .advanced-badge { font-size: 10px; }
  .overview-item-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 13px 0 0;
    padding-bottom: 12px;
  }
  .overview-item-metrics > div { min-width: 0; }
  .overview-item-metrics dt {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: -.15px;
    overflow-wrap: anywhere;
  }
  .overview-item-metrics dd {
    margin: 2px 0 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .overview-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }
  .overview-item-footer .overview-last-date {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.8;
    min-width: 0;
  }
  .overview-item-footer .overview-last-date time {
    display: block;
    color: var(--ink);
    font-size: 12px;
  }
  .overview-records-action.btn {
    flex: 0 0 auto;
    margin-left: auto;
    background: var(--pale);
    border-radius: 7px;
    min-height: 40px;
    font-size: 11px;
    padding: 7px 10px;
  }
  .overview-records-action.btn:disabled { background: #f5f7f7; }

  .record-table-layout { min-width: 0; }
  .record-table-layout > .grouped-table { display: none; }
  .record-table-layout > .compact-record-list {
    display: block;
    background: #fff;
    padding: 0 13px;
    min-width: 0;
  }
  .record-table-layout.has-inline-edit > .grouped-table { display: block; }
  .record-table-layout.has-inline-edit > .compact-record-list { display: none; }
  .compact-record-row { padding: 13px 0 11px; min-width: 0; }
  .compact-record-row + .compact-record-row { border-top: 1px solid #e5eeea; }
  .compact-record-user {
    margin-bottom: 7px;
    color: var(--green);
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .compact-record-title {
    margin-bottom: 7px;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  .compact-record-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }
  .compact-record-date {
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .compact-record-staff {
    min-width: 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .compact-record-completion {
    min-width: 0;
    max-width: 100%;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .compact-record-completion .badge,
  .badge.compact-record-completion {
    padding: 4px 5px;
    font-size: 10px;
    font-weight: 500;
    white-space: normal;
  }
  .compact-record-bottom {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin-top: 7px;
  }
  .compact-record-approach {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .compact-record-time {
    min-width: 0;
    flex: 0 1 auto;
    font-size: 11px;
    line-height: 1.6;
    color: var(--muted);
    overflow-wrap: anywhere;
  }
  .compact-record-actions {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 4px;
    margin-left: auto;
  }
  .compact-record-actions .btn {
    min-height: 40px;
    min-width: 40px;
    padding: 8px;
    font-size: 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafcfb;
    color: var(--muted);
  }
  .compact-record-extra {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 9px 0 0;
    padding-top: 9px;
    border-top: 1px dashed #e5eeea;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .compact-record-extra > div { min-width: 0; }
  .compact-record-extra .label,
  .compact-record-extra dt { display: block; font-size: 10px; color: var(--muted); }
  .compact-record-extra .value,
  .compact-record-extra dd { display: block; margin: 2px 0 0; }
}

@media (max-width: 350px) {
  .overview-status-filters { padding: 11px 12px; gap: 6px; }
  .overview-status-filters .overview-filter { padding: 8px; }
  .overview-item { padding-left: 12px; padding-right: 12px; }
  .record-table-layout > .compact-record-list { padding-left: 11px; padding-right: 11px; }
  .compact-record-top { gap: 5px; }
  .compact-record-bottom { gap: 6px; }
  .compact-record-extra { grid-template-columns: 1fr; }
}
