.attendance-heading {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 14px;
  padding: 24px 26px;
  border: 1px solid #dce4f2;
  border-top: 4px solid #2f6fe4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(45, 62, 115, 0.08);
}

.attendance-heading h2 {
  margin: 5px 0 7px;
  color: #101a3a;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.2;
}

.attendance-heading p {
  max-width: 760px;
  margin: 0;
  color: #68738f;
  font-size: 14px;
  line-height: 1.7;
}

.attendance-panel {
  padding: 20px;
  border: 1px solid #dce4f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(45, 62, 115, 0.07);
}

.attendance-guidance {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 3px solid #2f6fe4;
  background: #f4f7fe;
}

.attendance-guidance div {
  display: grid;
  gap: 3px;
}

.attendance-guidance strong {
  color: #183e8b;
  font-size: 14px;
}

.attendance-guidance span,
.attendance-guidance p {
  margin: 0;
  color: #68738f;
  font-size: 12px;
  line-height: 1.6;
}

.attendance-table-wrap {
  overflow-x: auto;
  border: 1px solid #e0e6f2;
  border-radius: 6px;
}

.attendance-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  color: #17213f;
  font-size: 12px;
}

.attendance-table th {
  padding: 11px 8px;
  color: #68738f;
  border-bottom: 1px solid #dce4f2;
  background: #f5f8fe;
  font-size: 11px;
  font-weight: 720;
  text-align: left;
  white-space: nowrap;
}

.attendance-table td {
  padding: 9px 7px;
  border-bottom: 1px solid #e8edf6;
  background: #fff;
  vertical-align: middle;
}

.attendance-table tbody tr:last-child td {
  border-bottom: 0;
}

.attendance-table tbody tr:hover td {
  background: #f9fbff;
}

.attendance-table td:first-child {
  min-width: 188px;
  border-left: 3px solid #d7e2f8;
}

.attendance-table tr.is-recorded td:first-child {
  border-left-color: #2f6fe4;
}

.attendance-table tr.is-management td {
  background: #f3f7ff;
}

.attendance-table tr.is-management td:first-child {
  border-left-color: #173f91;
}

.attendance-intern-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e6dcc7;
}

.attendance-intern-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-left: 3px solid #c8891b;
  background: #fff9ed;
}

.attendance-intern-heading div {
  display: grid;
  gap: 2px;
}

.attendance-intern-heading span {
  color: #8b5700;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
}

.attendance-intern-heading strong {
  color: #47371e;
  font-size: 14px;
}

.attendance-intern-heading small {
  color: #8b641f;
  font-size: 11px;
  font-weight: 720;
}

.attendance-table tr.is-intern td {
  background: #fffdf8;
}

.attendance-table tr.is-intern td:first-child {
  border-left-color: #c8891b;
}

.attendance-subject-kind.is-intern-kind {
  color: #8b5700;
  border-color: #ead3a4;
  background: #fff5dc;
}

.attendance-subject-kind {
  display: inline-flex;
  margin: 5px 5px 0 0;
  padding: 3px 6px;
  color: #1d4f9d;
  border: 1px solid #c8d9f5;
  border-radius: 4px;
  background: #e7efff;
  font-size: 10px;
  font-weight: 750;
}

.attendance-table input {
  width: 72px;
  min-height: 38px;
  padding: 8px;
  color: #17213f;
  border: 1px solid #d9e1f0;
  border-radius: 5px;
  background: #fbfcff;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.attendance-table input:focus {
  outline: 2px solid rgba(47, 111, 228, 0.18);
  border-color: #2f6fe4;
  background: #fff;
}

.attendance-table .attendance-note-input {
  width: 180px;
}

.attendance-row-state {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 6px;
  color: #75809b;
  border: 1px solid #dce3f0;
  border-radius: 4px;
  background: #f6f8fc;
  font-size: 10px;
  font-weight: 700;
}

.attendance-row-state.is-normal {
  color: #157b57;
  border-color: #c9eadc;
  background: #ecf9f3;
}

.attendance-row-state.is-warning {
  color: #9b5e00;
  border-color: #f0d8a9;
  background: #fff7e7;
}

.attendance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.attendance-actions span {
  color: #78839c;
  font-size: 11px;
}

.attendance-reference-chip {
  display: grid;
  min-width: 150px;
  max-width: 210px;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #dce3f0;
  border-radius: 5px;
  background: #f6f8fc;
}

.attendance-reference-chip strong {
  color: #5d6882;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.attendance-reference-chip small {
  color: #8c96aa;
  font-size: 10px;
}

.attendance-reference-chip.is-normal {
  border-color: #c8e9dc;
  background: #edf9f4;
}

.attendance-reference-chip.is-normal strong {
  color: #176b50;
}

.attendance-reference-chip.is-warning {
  border-color: #efd39d;
  background: #fff7e7;
}

.attendance-reference-chip.is-warning strong {
  color: #925800;
}

.assessment-attendance-reference {
  display: grid;
  grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 18px;
  margin: 2px 0 20px;
  padding: 14px 16px;
  border: 1px solid #dce4f2;
  border-left: 3px solid #2f6fe4;
  border-radius: 6px;
  background: #f5f8fe;
}

.assessment-attendance-reference div {
  display: grid;
  gap: 3px;
}

.assessment-attendance-reference span {
  color: #71809e;
  font-size: 11px;
}

.assessment-attendance-reference strong {
  color: #183e8b;
  font-size: 14px;
  line-height: 1.45;
}

.assessment-attendance-reference p {
  margin: 0;
  color: #68738f;
  font-size: 12px;
  line-height: 1.6;
}

.assessment-attendance-reference.is-warning {
  border-color: #efd39d;
  border-left-color: #d98500;
  background: #fff8ea;
}

.assessment-attendance-reference.is-warning strong {
  color: #8e5700;
}

@media (max-width: 760px) {
  .attendance-heading {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .attendance-panel {
    padding: 12px;
  }

  .attendance-guidance,
  .assessment-attendance-reference {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .attendance-table-wrap {
    overflow: visible;
    border: 0;
  }

  .attendance-table,
  .attendance-table tbody {
    display: block;
    min-width: 0;
  }

  .attendance-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .attendance-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
    padding: 13px;
    border: 1px solid #dfe6f3;
    border-top: 3px solid #d7e2f8;
    border-radius: 6px;
    background: #fff;
  }

  .attendance-table tr.is-recorded {
    border-top-color: #2f6fe4;
  }

  .attendance-table tr.is-management {
    border-top-color: #173f91;
    background: #f3f7ff;
  }

  .attendance-table tr.is-intern {
    border-top-color: #c8891b;
    background: #fffdf8;
  }

  .attendance-intern-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .attendance-table td,
  .attendance-table td:first-child {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .attendance-table td:first-child {
    grid-column: 1 / -1;
  }

  .attendance-table td:not(:first-child)::before {
    content: attr(data-label);
    color: #75809a;
    font-size: 10px;
    font-weight: 700;
  }

  .attendance-table input,
  .attendance-table .attendance-note-input {
    width: 100%;
  }

  .attendance-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-actions .button {
    width: 100%;
  }

  .attendance-reference-chip {
    min-width: 135px;
    max-width: 180px;
  }
}
