/* 99-attendance-hub-injected.css
   Attendance Hub styles that js/attendance-hub.js used to build in a template string and append to <head> at startup.
   They load after every other sheet, exactly where the injected <style> element sat. Files in css/ load in filename order: see docs/CSS.md. */

.attendance-voided > td {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 7px,
    color-mix(in srgb, currentColor 9%, transparent) 7px 9px
  ) !important;
}
.attendance-voided > td:nth-child(3) {
  text-decoration: line-through;
  text-decoration-color: currentColor;
}
.attendance-member-record .attendance-voided > td:nth-child(2),
.attendance-print-record .attendance-voided > td:nth-child(2) {
  text-decoration: line-through;
  text-decoration-color: currentColor;
}
@media print {
  .attendance-voided > td {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
.attendance-discipline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}
.attendance-discipline-layout > * {
  min-width: 0;
}
.attendance-discipline-layout h3,
.attendance-action-history > h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
.attendance-discipline-key {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.attendance-discipline-key .attendance-thresholds {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 10px;
  margin: 0;
}
.attendance-discipline-key .attendance-thresholds > span {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
  border-left: 4px solid var(--tc);
  border-radius: 9px;
  background: color-mix(in srgb, var(--tc) 9%, transparent);
}
.attendance-discipline-key .attendance-thresholds b {
  margin: 0;
  color: var(--tc);
  font-size: 24px;
}
.attendance-discipline-key .attendance-thresholds strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.attendance-discipline-layout .attendance-alert-card {
  display: grid !important;
  grid-template-columns: minmax(100px, 1.2fr) minmax(78px, 0.85fr) minmax(60px, 0.6fr) minmax(120px, 1.1fr) !important;
  grid-template-areas: none !important;
  gap: 14px;
  align-items: center;
  padding: 14px 12px;
}
.attendance-discipline-layout .attendance-alert-card > div {
  grid-area: auto !important;
  min-width: 0;
}
.attendance-alert-name .attendance-member-link {
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.attendance-alert-fact > span {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  white-space: normal !important;
  overflow-wrap: normal;
}
.attendance-alert-fact > strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  font-weight: 650;
}
.attendance-alert-action {
  display: grid;
  gap: 6px;
  text-align: center;
}
.attendance-alert-action-label {
  color: var(--discipline-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.attendance-discipline-layout .attendance-alert-action .attendance-primary {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--discipline-color) 65%, transparent);
  background: color-mix(in srgb, var(--discipline-color) 19%, var(--card));
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}
.attendance-discipline-layout .attendance-alert-action .attendance-primary:hover {
  background: color-mix(in srgb, var(--discipline-color) 32%, var(--card));
}
@media (min-width: 740px) and (max-width: 1049px) {
  .attendance-discipline-layout .attendance-alert-card {
    gap: 10px;
    padding: 12px 8px;
    grid-template-columns: minmax(90px, 1fr) 80px 64px 130px !important;
  }
  .attendance-alert-name .attendance-member-link {
    font-size: 15px;
  }
}
@media (max-width: 560px) {
  .attendance-discipline-layout .attendance-alert-card {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  .attendance-alert-name {
    grid-column: 1;
  }
  .attendance-alert-action {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .attendance-alert-fact {
    grid-column: 1;
  }
}
.attendance-discipline-badge {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--discipline-color) 40%, transparent);
  border-radius: 7px;
  color: var(--discipline-color) !important;
  background: color-mix(in srgb, var(--discipline-color) 10%, transparent);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.attendance-action-history {
  margin-top: 28px !important;
}
.attendance-completed-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.attendance-completed-table th,
.attendance-completed-table td {
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.attendance-completed-table th {
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.attendance-completed-table td {
  border-top: 1px solid var(--line);
}
.attendance-completed-table tr:nth-child(even) td {
  background: rgba(128, 128, 128, 0.04);
}
.attendance-completed-table th:nth-child(1) {
  width: 15%;
}
.attendance-completed-table th:nth-child(2) {
  width: 19%;
}
.attendance-completed-table th:nth-child(3) {
  width: 10%;
}
.attendance-completed-table th:nth-child(4) {
  width: 6%;
}
.attendance-completed-table th:nth-child(5) {
  width: 15%;
}
.attendance-completed-table th:nth-child(6) {
  width: 16%;
}
.attendance-completed-table th:nth-child(7) {
  width: 19%;
}
.attendance-completed-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.attendance-completed-table .attendance-member-link {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}
.attendance-document-controls {
  display: grid;
  gap: 8px;
}
.attendance-action-history .attendance-document-controls button {
  min-height: 40px;
  padding: 8px;
  font-size: 12px;
  white-space: normal;
}
@media (min-width: 740px) {
  .attendance-discipline-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
}
@media (min-width: 1050px) {
  .attendance-discipline-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
  }
}
@media (max-width: 600px) {
  .attendance-completed-table th,
  .attendance-completed-table td {
    padding: 9px 5px;
    font-size: 11px;
  }
  .attendance-completed-table th:nth-child(4),
  .attendance-completed-table td:nth-child(4) {
    display: none;
  }
  .attendance-completed-table .attendance-member-link,
  .attendance-completed-table .attendance-discipline-badge {
    font-size: 11px;
  }
  .attendance-completed-table .attendance-discipline-badge {
    padding: 3px;
  }
  .attendance-action-history .attendance-document-controls button {
    font-size: 11px;
    padding: 6px 3px;
  }
}

.attendance-threshold-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.attendance-recording-modal .attendance-threshold-prompt-actions > button {
  flex: 1;
  min-width: 180px;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.attendance-recording-modal [data-document-later] {
  background: var(--surface-2, #18191c);
  border: 1px solid var(--border-color, #34363c);
  color: inherit;
}

.attendance-modal.attendance-recording-modal {
  width: min(620px, calc(100vw - 32px));
  max-width: 620px;
  padding: 28px;
}
.attendance-recording-modal header h2 {
  font-size: 26px;
  line-height: 1.2;
}
.attendance-recording-modal form {
  font-size: 16px;
}
.attendance-recording-modal form label,
.attendance-recording-modal .attendance-field-label {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.attendance-recording-modal form input,
.attendance-recording-modal form textarea,
.attendance-recording-modal .attendance-date-button,
.attendance-recording-modal .attendance-select > button,
.attendance-recording-modal .attendance-select .custom-select-option {
  font-size: 17px;
  line-height: 1.4;
  min-height: 50px;
}
.attendance-recording-modal form small,
.attendance-recording-modal .attendance-member-results p {
  font-size: 14px;
  line-height: 1.45;
}
.attendance-recording-modal .attendance-member-results button strong {
  font-size: 17px;
}
.attendance-recording-modal .attendance-member-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--border-color, #34363c);
  border-radius: 10px;
  background: var(--surface-2, #18191c);
  color: inherit;
}
.attendance-recording-modal .attendance-member-selected strong {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
}
.attendance-recording-modal .attendance-member-selected button {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--border-color, #34363c);
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.attendance-member-selected svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.attendance-recording-modal .attendance-record-flow-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 650;
  cursor: pointer;
}
.attendance-recording-modal [data-record-back] {
  background: var(--surface-2, #18191c);
  border: 1px solid var(--border-color, #34363c);
  color: inherit;
}
.attendance-recording-modal [data-record-back]:hover,
.attendance-recording-modal .attendance-upload-button:hover {
  border-color: #7982ff;
  background: rgba(121, 130, 255, 0.09);
}
.attendance-photo-field {
  display: grid;
  gap: 10px;
}
.attendance-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
}
.attendance-field-label small {
  text-transform: none;
  font-weight: 400;
  opacity: 0.65;
}
.attendance-recording-modal .attendance-upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px dashed var(--border-color, #444750);
  border-radius: 10px;
  background: var(--surface-2, #18191c);
  color: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.attendance-upload-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.attendance-photo-help {
  text-align: center;
  opacity: 0.6;
}
.attendance-recording-modal [data-note-preview] {
  padding: 14px;
  border: 1px solid var(--border-color, #34363c);
  border-radius: 10px;
}
.attendance-recording-modal [data-note-preview] img {
  margin: auto;
}
.attendance-recording-modal [data-note-preview] p {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.attendance-recording-modal [data-note-preview] button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-color, #34363c);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 15px;
}
.attendance-recording-modal button:focus-visible {
  outline: 2px solid #7982ff;
  outline-offset: 3px;
}
@media (max-width: 480px) {
  .attendance-modal.attendance-recording-modal {
    padding: 20px;
  }
  .attendance-recording-modal header h2 {
    font-size: 23px;
  }
}
@media (min-width: 900px) and (orientation: landscape) {
  .attendance-modal.attendance-recording-modal {
    width: min(860px, calc(100vw - 48px));
    max-width: 860px;
    max-height: calc(100dvh - 80px);
    padding: 24px;
  }
  .attendance-recording-modal [data-record-details] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 20px;
    align-items: start;
  }
  .attendance-recording-modal [data-record-details] > .attendance-member-picker,
  .attendance-recording-modal [data-record-rule] {
    grid-column: 1 / -1;
  }
  .attendance-recording-modal [data-record-details] > label {
    min-width: 0;
    margin: 0;
  }
  .attendance-recording-modal [data-record-details]:has(.attendance-photo-field[hidden]) > label:has(textarea) {
    grid-column: 1 / -1;
  }
  .attendance-recording-modal [data-record-details] textarea {
    min-height: 120px;
    height: 120px;
  }
  .attendance-recording-modal .attendance-photo-field {
    align-content: start;
  }
  .attendance-recording-modal [data-note-preview] {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding: 8px;
  }
  .attendance-recording-modal [data-note-preview] img {
    width: 80px;
    max-height: 80px !important;
    grid-row: 1 / 3;
    object-fit: contain;
  }
  .attendance-recording-modal [data-note-preview] p {
    margin: 0;
  }
  .attendance-recording-modal [data-note-preview] button {
    justify-self: start;
  }
  .attendance-recording-modal .attendance-photo-field:has([data-note-preview]:not([hidden])) > .attendance-upload-button,
  .attendance-recording-modal .attendance-photo-field:has([data-note-preview]:not([hidden])) > .attendance-photo-help {
    display: none;
  }
  .attendance-recording-modal .attendance-member-picker {
    position: relative;
  }
  .attendance-recording-modal .attendance-member-results:has([data-attendance-member-result]) {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--border-color, #34363c);
    border-radius: 10px;
    background: var(--surface-2, #18191c);
    box-shadow: 0 12px 24px #0005;
  }
  .attendance-recording-modal .attendance-record-flow-actions {
    padding-top: 14px;
  }
}

.attendance-modal [hidden] {
  display: none !important;
}
.attendance-type-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.attendance-modal .attendance-type-tiles button {
  position: relative;
  min-height: 112px;
  padding: 20px 32px 20px 16px;
  border: 1px solid var(--border-color, #303239);
  border-radius: 12px;
  background: var(--surface-2, #18191c);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.attendance-type-tiles strong,
.attendance-type-tiles span {
  display: block;
}
.attendance-type-tiles strong {
  font-size: 18px;
  margin-bottom: 8px;
}
.attendance-type-tiles span {
  font-size: 14px;
  opacity: 0.65;
  line-height: 1.4;
}
.attendance-type-tiles b {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}
.attendance-modal .attendance-type-tiles button:hover {
  border-color: #7982ff;
  background: rgba(121, 130, 255, 0.09);
}
.attendance-record-flow-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}
[data-record-types][hidden],
[data-record-details][hidden],
[data-record-review][hidden],
[data-record-actions][hidden] {
  display: none !important;
}
[data-record-details] {
  display: grid;
  gap: 16px;
}
@media (max-width: 420px) {
  .attendance-type-tiles {
    grid-template-columns: 1fr;
  }
  .attendance-modal .attendance-type-tiles button {
    min-height: 76px;
  }
}

.attendance-modal .attendance-date-button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #303239);
  border-radius: 10px;
  background: var(--surface-2, #18191c);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.attendance-modal .attendance-select {
  padding: 0;
  border-radius: 10px;
  background: var(--surface-2, #18191c);
  border-color: var(--border-color, #303239);
}
.attendance-modal .attendance-select > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  text-align: left;
  color: inherit;
  font: inherit;
}
.attendance-modal .attendance-select .custom-select-options {
  background: var(--surface-2, #18191c);
  border-radius: 10px;
  max-height: 240px;
}
.attendance-modal .attendance-select .custom-select-option {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.attendance-modal .attendance-select .custom-select-option:hover,
.attendance-modal .attendance-select .custom-select-option:focus-visible,
.attendance-modal .attendance-select [aria-selected="true"] {
  background: rgba(120, 130, 255, 0.15);
}
.attendance-modal.attendance-recording-modal .attendance-select > button,
.attendance-modal.attendance-recording-modal .attendance-select .custom-select-option {
  font-size: 17px;
  line-height: 1.4;
  min-height: 50px;
}
.attendance-excusing-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-color, #303239);
  border-radius: 12px;
  background: rgba(128, 128, 128, 0.04);
}
.attendance-excusing-section[hidden] {
  display: none !important;
}
.attendance-excusing-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.attendance-excusing-section h3 {
  margin: 0;
  font-size: 16px;
}
.attendance-excusing-section > p {
  margin: 8px 0 12px;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.8;
}
.attendance-modal .attendance-excusing-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  border-top: 1px solid rgba(128, 128, 128, 0.15);
  cursor: pointer;
}
.attendance-modal .attendance-excusing-choice input {
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  flex: none;
  accent-color: #7982ff;
}
.attendance-excusing-choice > span {
  flex: 1;
  min-width: 0;
}
.attendance-excusing-choice strong,
.attendance-excusing-choice small {
  display: block;
}
.attendance-excusing-choice small {
  margin-top: 4px;
  opacity: 0.65;
}
.attendance-excusing-choice > b {
  white-space: nowrap;
  font-size: 14px;
}
.attendance-excusing-impact:empty {
  display: none;
}

.attendance-modal.attendance-recording-modal.is-picking {
  width: min(540px, calc(100vw - 32px));
  max-width: 540px;
  padding: 24px;
}
.attendance-recording-modal.is-picking header h2 {
  font-size: 24px;
}
.attendance-type-tiles {
  gap: 10px;
  margin-top: 6px;
}
.attendance-modal .attendance-type-tiles button {
  --tone: #7982ff;
  min-height: 86px;
  padding: 14px 30px 14px 16px;
  border: 1px solid color-mix(in srgb, var(--tone) 32%, transparent);
  border-left: 4px solid var(--tone);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 12%, #14161b);
  transition:
    background 0.12s,
    transform 0.06s;
}
.attendance-modal .attendance-type-tiles button[data-tone="bad"] {
  --tone: #e5534b;
}
.attendance-modal .attendance-type-tiles button[data-tone="good"] {
  --tone: #3fb97a;
}
.attendance-modal .attendance-type-tiles button[data-tone]:hover {
  border-color: color-mix(in srgb, var(--tone) 60%, transparent);
  border-left-color: var(--tone);
  background: color-mix(in srgb, var(--tone) 20%, #14161b);
}
.attendance-modal .attendance-type-tiles button[data-tone]:active {
  transform: scale(0.985);
}
.attendance-type-tiles strong {
  margin-bottom: 4px;
  font-size: 17px;
}
.attendance-type-tiles span {
  font-size: 13px;
}
.attendance-type-tiles b {
  right: 12px;
  color: var(--tone);
  font-size: 22px;
}

.attendance-rule-field {
  display: grid;
  gap: 8px;
}
.attendance-rule-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
@media (min-width: 700px) {
  .attendance-rule-chips {
    grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  }
}
.attendance-rule-chip {
  --tone: #e5534b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 86px;
  padding: 12px 12px 11px;
  border: 1.5px solid #2d3140;
  border-radius: 12px;
  background: #14161b;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.06s;
}
.attendance-rule-chip[data-tone="good"] {
  --tone: #3fb97a;
}
.attendance-rule-chip strong {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
  color: #dfe3ec;
}
.attendance-rule-chip small {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  color: var(--tone);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.attendance-rule-chip:hover {
  border-color: color-mix(in srgb, var(--tone) 55%, #2d3140);
}
.attendance-rule-chip:active {
  transform: scale(0.985);
}
.attendance-rule-chip.is-picked {
  border-color: var(--tone);
  background: color-mix(in srgb, var(--tone) 22%, #14161b);
  box-shadow: 0 0 0 1px var(--tone) inset;
}
.attendance-rule-chip.is-picked strong {
  color: #fff;
}
.attendance-rule-chip.is-picked strong::after {
  content: " ✓";
  color: var(--tone);
}

/* finishing touches */
.attendance-app > main {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: none !important;
}
.attendance-overview-summary {
  grid-template-columns: 1.2fr 0.85fr 1fr 0.85fr 1.7fr !important;
  width: 100%;
}
@media (max-width: 900px) {
  .attendance-overview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 520px) {
  .attendance-overview-summary {
    grid-template-columns: 1fr !important;
  }
}
@media (min-width: 741px) {
  .attendance-activity-table {
    min-width: 0 !important;
    width: 100%;
  }
  .attendance-activity .attendance-activity-table th:first-child,
  .attendance-activity .attendance-activity-table td:first-child {
    width: 100px !important;
    min-width: 100px !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
  .attendance-activity-table th:last-child,
  .attendance-activity-table td:last-child {
    min-width: 92px;
  }
  .attendance-activity-table td:nth-child(5) {
    min-width: 0 !important;
  }
  .attendance-activity-table th,
  .attendance-activity-table td {
    padding-left: 10px;
    padding-right: 10px;
  }
}
.attendance-settings > header {
  align-items: flex-start;
  gap: 16px;
}
.attendance-settings .attendance-policy-reset {
  flex: none;
  width: auto !important;
  padding: 10px 16px;
  border: 1px solid #2d3140;
  border-radius: 10px;
  background: #1d2029;
  color: #cdd3e2;
  font-size: 14px !important;
  font-weight: 750;
  letter-spacing: normal;
  cursor: pointer;
}
.attendance-settings .attendance-policy-reset:hover {
  border-color: #e4a72b88;
  color: #fff;
}
.attendance-settings .attendance-policy-reset.confirming {
  border-color: #ed6b6288;
  background: #ed6b6214;
  color: #ed8179;
}
.attendance-settings-host .attendance-policy-groups {
  grid-template-columns: 1fr !important;
}

/* policy: thresholds */
.attendance-settings form > fieldset[data-policy-section="thresholds"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 18px 0 0;
  padding: 16px 16px 18px;
}
fieldset[data-policy-section="thresholds"] .attendance-policy-rows {
  display: grid;
  gap: 12px;
}
.attendance-policy-row-color {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 92px auto 46px !important;
  grid-template-areas: "color label points unit del" "sig sig sig sig sig" !important;
  gap: 12px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #2d3140;
  border-radius: 14px;
  background: #171a21;
}
.attendance-policy-row-color > input[type="color"] {
  grid-area: color;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 1px solid #2d3140;
  border-radius: 12px;
  background: #0e1014;
  cursor: pointer;
}
.attendance-policy-row-color > input[data-policy-label] {
  grid-area: label;
  min-width: 0;
}
.attendance-policy-row-color > input[data-policy-points] {
  grid-area: points;
  min-width: 0;
  text-align: center;
}
.attendance-policy-row-color > span:not(.attendance-policy-delete-icon) {
  grid-area: unit;
  color: #8f97aa;
  font-size: 13px;
  font-weight: 700;
}
.attendance-policy-row-color > button[data-policy-delete] {
  grid-area: del;
  width: 46px;
  height: 46px;
}
.attendance-policy-row-color .attendance-policy-sig-toggle {
  grid-area: sig;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #262a35;
  color: #cdd3e2;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}
.attendance-policy-row-color .attendance-policy-sig-toggle span {
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
  font-weight: 650;
}
.attendance-policy-sig-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 14px;
  background: #2d3140;
  cursor: pointer;
  transition: background 0.15s;
}
.attendance-policy-sig-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #cdd3e2;
  transition:
    transform 0.15s,
    background 0.15s;
}
.attendance-policy-sig-toggle input[type="checkbox"]:checked {
  background: #e4a72b;
}
.attendance-policy-sig-toggle input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: #17191f;
}

/* iPad portrait (about 768px wide). The Activity table gets fixed widths for every column but Notes, so Notes keeps the leftover room instead of
   collapsing to nothing (Safari shares a fixed-layout table's leftover space differently from Chrome). Completed actions get a wider Date and
   Signature column so dates and "Acknowledged" no longer break mid-word. */
@media (min-width: 741px) and (max-width: 900px) {
  body .attendance-activity .attendance-activity-table:not(.attendance-excused-table) :is(th, td):nth-child(1) {
    width: 84px !important;
    min-width: 84px !important;
  }
  body .attendance-activity .attendance-activity-table:not(.attendance-excused-table) :is(th, td):is(:nth-child(2), :nth-child(6)) {
    width: 110px !important;
  }
  body .attendance-activity .attendance-activity-table:not(.attendance-excused-table) :is(th, td):nth-child(3) {
    width: 135px !important;
  }
  body .attendance-activity .attendance-activity-table:not(.attendance-excused-table) :is(th, td):nth-child(4) {
    width: 54px !important;
  }
  body .attendance-activity .attendance-activity-table:not(.attendance-excused-table) :is(th, td):nth-child(7) {
    width: 82px !important;
  }
}
/* the compact row summary is for phones; on a tablet it would add an eighth column */
@media (min-width: 701px) {
  .attendance-activity-table td.attendance-row-meta {
    display: none !important;
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  .attendance-completed-table th:nth-child(1) {
    width: 14%;
  }
  .attendance-completed-table th:nth-child(2) {
    width: 17%;
  }
  .attendance-completed-table th:nth-child(3) {
    width: 12%;
  }
  .attendance-completed-table th:nth-child(4) {
    width: 6%;
  }
  .attendance-completed-table th:nth-child(5) {
    width: 14%;
  }
  .attendance-completed-table th:nth-child(6) {
    width: 18%;
  }
  .attendance-completed-table th:nth-child(7) {
    width: 19%;
  }
  .attendance-completed-table td:nth-child(3) {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

/* Overview cards on a portrait iPad (768 to 900px wide): one row with the landscape proportions, instead of a two-column stack or a sideways strip */
@media (min-width: 701px) and (max-width: 900px) {
  .attendance-app .attendance-overview-summary {
    display: grid !important;
    grid-template-columns: 1.2fr 0.85fr 1fr 0.85fr 1.7fr !important;
    gap: 9px;
    margin-right: 0;
    margin-left: 0;
    padding: 0;
    overflow: visible;
  }
  .attendance-app .attendance-overview-summary > * {
    grid-column: auto !important;
    flex-basis: auto;
    min-width: 0;
  }
}
