/* Canonical attendance dashboard, metrics and session matrix. */
.attm-toolbar-card {
  padding: 16px 18px;
}
.attm-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.attm-controls label {
  display: grid;
  gap: 6px;
  min-width: 220px;
}
.attm-controls label span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #777;
}
.attm-controls select {
  appearance: none;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  padding: 11px 36px 11px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  color: #111;
  min-height: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #111 50%),
    linear-gradient(135deg, #111 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 18px,
    calc(100% - 11px) 18px;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}
.attm-month-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.attm-month-nav button {
  height: 42px;
  min-width: 42px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}
.attm-month-nav button:hover {
  border-color: #111;
}
.attm-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.attm-metric {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 16px 18px;
  display: grid;
  gap: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.035);
}
.attm-metric strong {
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
}
.attm-metric span {
  font-size: 11px;
  font-weight: 900;
}
.attm-metric small {
  font-size: 9px;
  color: #777;
}
.attm-metric.highlight {
  background: #fff9c9;
  border-color: #ffe500;
}
.attm-metric.danger strong {
  color: #c62d24;
}
.attm-metric.warning strong {
  color: #9a6b00;
}
.attm-calendar-card,
.attm-summary-card {
  margin-top: 14px;
}
.attm-calendar .cal-event.done {
  background: #e8f7ed;
  color: #08752e;
  border: 1px solid #ccebd7;
}
.attm-calendar .cal-event.cancelled {
  background: #fff0ef;
  color: #a4261f;
  text-decoration: line-through;
  border: 1px solid #f5cdc9;
}
.attm-cal-event {
  width: 100%;
  text-align: left;
}
.attm-table-wrap {
  overflow: auto;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  max-width: 100%;
  background: #fff;
}
.attm-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  background: #fff;
}
.attm-table th,
.attm-table td {
  border-right: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
  text-align: center;
  padding: 0;
}
.attm-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f7f7f7;
}
.attm-table tbody tr:last-child td {
  border-bottom: 0;
}
.attm-player-head,
.attm-player-cell {
  position: sticky !important;
  left: 0;
  z-index: 5 !important;
  background: #fff !important;
  text-align: left !important;
  min-width: 210px;
}
.attm-player-head {
  background: #0b0b0b !important;
  color: #fff !important;
  padding: 13px 14px !important;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.attm-player-cell {
  padding: 11px 14px !important;
}
.attm-player-cell strong {
  display: block;
  font-size: 11px;
  white-space: nowrap;
}
.attm-player-cell small {
  display: block;
  font-size: 9px;
  color: #888;
  margin-top: 3px;
}
.attm-session-head {
  min-width: 68px;
}
.attm-session-head button {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 8px 6px;
  display: grid;
  gap: 0;
  cursor: pointer;
}
.attm-session-head button:hover {
  background: #fff8bd;
}
.attm-session-head strong {
  font-size: 14px;
}
.attm-session-head span {
  font-size: 9px;
  text-transform: uppercase;
  color: #666;
}
.attm-session-head small {
  font-size: 8px;
  color: #999;
}
.attm-session-head.cancelled {
  opacity: 0.55;
}
.attm-total-head {
  min-width: 112px;
  padding: 0 10px !important;
  font-size: 10px;
  text-transform: uppercase;
}
.attm-status {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 0;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.attm-status:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.attm-status.present {
  background: #dcf5e4;
  color: #08752e;
}
.attm-status.absent {
  background: #ffe1de;
  color: #b3261e;
}
.attm-status.late {
  background: #fff0bf;
  color: #8b6200;
}
.attm-status.just {
  background: #e8ecff;
  color: #3346a8;
}
.attm-status.pending {
  background: #f2f2f2;
  color: #777;
}
.attm-status.future {
  background: #fafafa;
  color: #bbb;
}
.attm-status.cancelled {
  background: #f5f5f5;
  color: #aaa;
}
.attm-total-cell {
  padding: 7px 10px !important;
  min-width: 112px;
}
.attm-percent {
  display: grid;
  grid-template-columns: 36px 1fr 24px;
  gap: 7px;
  align-items: center;
}
.attm-percent strong {
  font-size: 11px;
}
.attm-percent span {
  height: 6px;
  border-radius: 99px;
  background: #eee;
  overflow: hidden;
}
.attm-percent span i {
  display: block;
  height: 100%;
  background: #ffe500;
  border-radius: inherit;
}
.attm-percent small {
  font-size: 8px;
  color: #777;
}
.attm-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 9px;
  color: #666;
}
.attm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.attm-legend i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 900;
}
.attm-legend i.present {
  background: #dcf5e4;
  color: #08752e;
}
.attm-legend i.absent {
  background: #ffe1de;
  color: #b3261e;
}
.attm-legend i.late {
  background: #fff0bf;
  color: #8b6200;
}
.attm-legend i.just {
  background: #e8ecff;
  color: #3346a8;
}
.attm-legend i.pending,
.attm-legend i.cancelled {
  background: #f2f2f2;
  color: #777;
}
.attm-pending-card {
  margin-top: 14px;
}
.attm-pending-list {
  display: grid;
  gap: 8px;
}
.attm-pending-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 1px solid #ececec;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}
.attm-pending-list button:hover {
  border-color: #ffe500;
  background: #fffdf0;
}
.attm-pending-list div {
  display: grid;
  gap: 2px;
}
.attm-pending-list strong {
  font-size: 11px;
}
.attm-pending-list span {
  font-size: 9px;
  color: #777;
}
.attm-pending-list b {
  font-size: 9px;
  white-space: nowrap;
}
.attm-summary-card .card-title,
.attm-calendar-card .card-title {
  align-items: flex-end;
}
.attm-summary-card .card-title h2,
.attm-calendar-card .card-title h2 {
  margin-top: 3px;
}
.attm-summary-card .card-title small,
.attm-calendar-card .card-title small {
  font-size: 9px;
  color: #777;
}
@media (max-width: 980px) {
  .attm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attm-controls label {
    min-width: 180px;
    flex: 1;
  }
  .attm-month-nav {
    margin-left: 0;
  }
}
@media (max-width: 720px) {
  .attm-toolbar-card {
    padding: 14px;
  }
  .attm-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .attm-controls label {
    min-width: 0;
  }
  .attm-month-nav {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
  }
  .attm-month-nav button {
    width: 100%;
  }
  .attm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .attm-metric {
    padding: 13px;
  }
  .attm-metric strong {
    font-size: 22px;
  }
  .attm-player-head,
  .attm-player-cell {
    min-width: 165px;
  }
  .attm-player-cell strong {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .attm-session-head {
    min-width: 58px;
  }
  .attm-total-head,
  .attm-total-cell {
    min-width: 96px;
  }
  .attm-percent {
    grid-template-columns: 32px 1fr;
  }
  .attm-percent small {
    display: none;
  }
  .attm-calendar-card,
  .attm-summary-card {
    padding: 14px;
  }
  .attm-pending-list button {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

/* Attendance calendar court variants formerly coupled to permissions. */
.attm-cal-event {
  display: grid !important;
  gap: 2px !important;
  text-align: left !important;
  border-left: 4px solid #ffe500 !important;
}
.attm-cal-event strong {
  font-size: 9px !important;
}
.attm-cal-event small {
  font-size: 8px !important;
  color: #666 !important;
}
.attm-cal-event.court-green {
  border-left-color: #3c9b63 !important;
  background: #f1fbf4 !important;
}
.attm-cal-event.court-grey {
  border-left-color: #7d8288 !important;
  background: #f4f5f6 !important;
}
.attm-cal-event.court-brossa {
  border-left-color: #bd8b42 !important;
  background: #fff8ed !important;
}
.attm-cal-event.court-edm {
  border-left-color: #4c79bf !important;
  background: #f1f6fd !important;
}
.attm-cal-event.court-other {
  border-left-color: #ffe500 !important;
  background: #fffdf0 !important;
}
.attm-session-head.court-green {
  box-shadow: inset 0 4px 0 #3c9b63;
}
.attm-session-head.court-grey {
  box-shadow: inset 0 4px 0 #7d8288;
}
.attm-session-head.court-brossa {
  box-shadow: inset 0 4px 0 #bd8b42;
}
.attm-session-head.court-edm {
  box-shadow: inset 0 4px 0 #4c79bf;
}
.attm-session-head.court-other {
  box-shadow: inset 0 4px 0 #ffe500;
}
@media (max-width: 720px) {
  .attm-cal-event strong {
    font-size: 10px !important;
  }
  .attm-cal-event small {
    font-size: 9px !important;
  }
}
