/* Official timetable presentation shared by admin and the public portal. */
.official-list-document {
  overflow: hidden;
  margin: 0;
  border: 1px solid #d7e5dc;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 71, 47, .055);
}

.official-list-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 1.25rem 1rem;
  border-bottom: 3px solid #0b6747;
  background: linear-gradient(180deg, #fff, #f7fbf8);
  color: #1a422e;
  text-align: center;
}

.official-list-heading span {
  color: #387054;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.official-list-heading strong {
  color: #123c2a;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 850;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.official-list-heading small { color: #6c7e71; font-size: .76rem; }

.official-list-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  color: #21382e;
  font-size: .79rem;
}

.official-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .78rem .9rem;
  border-right: 1px solid #b7d2bf;
  border-bottom: 2px solid #8cb69a;
  background: #e8f2e9;
  color: #20563a;
  font-size: .71rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.official-list-table thead th:last-child { border-right: 0; }

.official-list-table tbody tr { --section-tint: rgb(var(--subject-r) var(--subject-g) var(--subject-b) / .15); }
.official-list-table tbody tr:nth-child(even) { background: #fbfdfb; }
.official-list-table tbody tr:hover { background: #f2f8f3; }

.official-list-table tbody td {
  padding: .72rem .9rem;
  border-right: 1px solid #e4ece6;
  border-bottom: 1px solid #e1e9e3;
  line-height: 1.45;
  vertical-align: middle;
}

.official-list-table tbody td:first-child {
  border-left: 4px solid rgb(var(--subject-r) var(--subject-g) var(--subject-b));
  font-weight: 700;
  white-space: nowrap;
}

.official-list-table tbody td:last-child { border-right: 0; }
.official-list-table tbody tr:last-child td { border-bottom: 0; }
.official-list-table tbody strong { display: block; color: #153d2c; font-size: .82rem; }
.official-list-table tbody small { display: block; margin-top: .13rem; color: #6b7a71; font-size: .7rem; }
.official-list-table .list-time { color: #28523b; font-weight: 800; white-space: nowrap; }

.official-list-table .section-chip {
  display: inline-block;
  max-width: 100%;
  padding: .27rem .55rem;
  border: 1px solid rgb(var(--subject-r) var(--subject-g) var(--subject-b) / .32);
  border-radius: 6px;
  background: var(--section-tint);
  color: #193d2c;
  font-size: .73rem;
  font-weight: 800;
  white-space: nowrap;
}

.official-list-table .class-type {
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
}

.registrar-document,
.isu-grid-document { border-color: #d5e5da; }

.registrar-caption,
.isu-grid-caption { border-color: #0b6747; }

.registrar-grid { border-collapse: separate; border-spacing: 0; }
.registrar-grid td,
.registrar-grid th { border-color: #c6d8ca; }
.registrar-grid thead th {
  background: #e9f3e9;
  color: #20563a;
  border-color: #a9cbb4;
}
.registrar-grid tbody th { background: #f3f8f3; color: #466050; }
.registrar-grid tbody td { background: #fff; }

.registrar-grid .grid-class,
.registrar-grid .grid-class.laboratory,
.registrar-grid .grid-class.practical,
.registrar-grid .grid-class.written {
  border-color: rgb(var(--subject-r) var(--subject-g) var(--subject-b) / .55);
  background: rgb(var(--subject-r) var(--subject-g) var(--subject-b) / .2);
  color: #142d24;
  box-shadow: 0 1px 5px rgba(7, 53, 35, .09);
}

.registrar-grid .grid-class.laboratory { border-width: 2px; }
.registrar-grid .grid-class.practical { border-style: dashed; }
.registrar-grid .grid-class strong { color: #162f25; font-weight: 850; }
.registrar-grid .grid-class span,
.registrar-grid .grid-class small { color: #3b5145; }

.public-view-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: 1rem 0 1.2rem;
  padding: .3rem;
  border: 1px solid #d9e8dd;
  border-radius: 10px;
  background: #edf5ef;
}

.public-view-switch a {
  min-width: 120px;
  padding: .56rem .85rem;
  border-radius: 8px;
  color: #547160;
  font-size: .77rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.public-view-switch a[aria-current="page"] {
  background: #fff;
  color: #08704d;
  box-shadow: 0 2px 8px rgba(8, 58, 39, .09);
}

.public-view-switch a:focus-visible { outline: 3px solid #e4bd55; outline-offset: 2px; }
.public-list-document { margin-top: .2rem; }

@media (max-width: 700px) {
  .official-list-heading { padding: 1rem .7rem; }
  .official-list-heading span { font-size: .56rem; }
  .official-list-table { min-width: 800px; }
  .official-list-table thead th,
  .official-list-table tbody td { padding: .62rem .7rem; }
  .public-view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .public-view-switch a { min-width: 0; }
}

@media print {
  .official-list-document,
  .isu-grid-document,
  .registrar-document { box-shadow: none; border-radius: 0; }
  .official-list-table { min-width: 0; font-size: 8pt; }
  .official-list-table thead th,
  .official-list-table tbody td { padding: 4pt 5pt; }
  .public-view-switch { display: none; }
}

/* Spreadsheet-style sheet: actual merged table cells across each meeting. */
.xlsx-sheet-stack { display: grid; gap: 2rem; }
.xlsx-sheet {
  overflow: hidden;
  border: 1px solid #cbd9ce;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(7, 65, 41, .065);
}

.xlsx-sheet-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 1rem .8rem;
  color: #18271c;
  text-align: center;
}

.xlsx-sheet-heading span { font-size: .72rem; font-weight: 850; letter-spacing: .07em; }
.xlsx-sheet-heading strong { margin-top: .15rem; font-size: 1.2rem; font-weight: 900; letter-spacing: .01em; }
.xlsx-sheet-heading small { margin-top: .2rem; font-size: .76rem; font-weight: 700; }
.xlsx-sheet-heading b { margin-top: .3rem; font-size: .88rem; }
.xlsx-sheet-scroll { width: 100%; overflow-x: auto; }

.xlsx-sheet-grid {
  width: 100%;
  min-width: 1030px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  color: #101a13;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: .72rem;
}

.xlsx-sheet-grid th,
.xlsx-sheet-grid td { border: 1px solid #252c27; }
.xlsx-sheet-grid thead th {
  height: 37px;
  padding: .3rem .35rem;
  background: #ffecde;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}
.xlsx-sheet-grid thead th:first-child { width: 110px; }
.xlsx-sheet-grid thead small { display: block; color: #525e55; font-size: .62rem; font-weight: 600; }
.xlsx-sheet-grid tbody tr { height: 36px; }
.xlsx-sheet-grid tbody th {
  width: 110px;
  padding: .2rem .25rem;
  background: #fff;
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.xlsx-sheet-grid tbody td { padding: 0; background: #fff; }
.xlsx-sheet-grid tbody tr.xlsx-lunch th,
.xlsx-sheet-grid tbody tr.xlsx-lunch td:not(.xlsx-meeting) { background: #fff4d6; }

.xlsx-sheet-grid td.xlsx-meeting {
  padding: .35rem .25rem;
  background: var(--xlsx-fill);
  color: #17211b;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.xlsx-sheet-grid .xlsx-meeting strong,
.xlsx-sheet-grid .xlsx-meeting span,
.xlsx-sheet-grid .xlsx-meeting small { display: block; line-height: 1.3; }
.xlsx-sheet-grid .xlsx-meeting strong { font-size: .74rem; font-weight: 800; }
.xlsx-sheet-grid .xlsx-meeting span { margin-top: .15rem; font-size: .69rem; }
.xlsx-sheet-grid .xlsx-meeting small { margin-top: .15rem; font-size: .68rem; }

.xlsx-sheet footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
  color: #5a6d5e;
  font-size: .72rem;
}
.xlsx-sheet footer strong { color: #264b31; }

@media (max-width: 700px) {
  .xlsx-sheet-stack { gap: 1.2rem; }
  .xlsx-sheet { border-radius: 9px; }
  .xlsx-sheet-heading { padding: .9rem .7rem; }
  .xlsx-sheet-heading strong { font-size: 1.05rem; }
  .xlsx-sheet-grid { min-width: 900px; }
  .xlsx-sheet footer { flex-direction: column; gap: .3rem; }
}

@media print {
  .xlsx-sheet { break-after: page; border-radius: 0; box-shadow: none; }
  .xlsx-sheet:last-child { break-after: auto; }
  .xlsx-sheet-grid { min-width: 0; font-size: 8pt; }
  .xlsx-sheet-grid tbody tr { height: 24px; }
}
