/* Attendance Page Specific Styling */

/* Attendance Radio Controls (Week View) */
.att-cell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.att-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  user-select: none;
}

.att-opt {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
}

.att-opt input[type="radio"] {
  margin: 0;
  width: 13px;
  height: 13px;
  cursor: pointer;
  accent-color: var(--primary);
}

.att-opt.opt-co input[type="radio"]:checked {
  accent-color: var(--success);
}

.att-opt.opt-vang input[type="radio"]:checked {
  accent-color: var(--danger);
}

/* Day View Specific Columns & Buttons */
.col-day-att {
  width: 190px;
  text-align: center;
}

.col-day-leave {
  width: 140px;
  text-align: center;
}

.col-day-note {
  width: 140px;
  text-align: center;
}

.day-view-att-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.btn-att-choice {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #334155;
  transition: all 0.1s;
}

.btn-att-choice:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn-att-choice.choice-co.active {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
  box-shadow: 0 0 0 1px #86efac;
}

.btn-att-choice.choice-vang.active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  box-shadow: 0 0 0 1px #fca5a5;
}

.btn-att-choice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge-leave-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--leave-bg);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.badge-leave-tag:hover {
  background: var(--leave-bg-hover);
}

/* Leave Request Cells (Slate background, white text) */
td.is-leave {
  background: var(--leave-bg) !important;
  color: var(--leave-text);
  position: relative;
}

td.is-leave .att-opt {
  color: #ffffff;
}

td.is-leave .att-opt input[type="radio"] {
  accent-color: #ffffff;
}

.leave-badge {
  position: absolute;
  top: 1px;
  right: 2px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  opacity: 0.95;
  padding: 1px;
  border-radius: 2px;
}

.leave-badge:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.25);
}

.badge-missing {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 5px;
  border-radius: 2px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

td.is-unmarked-day {
  background: #fffbeb !important;
  box-shadow: inset 0 0 0 1.5px #f59e0b;
}

td.is-unmarked-day.is-leave {
  background: #546e7a !important;
  box-shadow: inset 0 0 0 2px #f59e0b;
}

/* Saving State Indicator */
td.is-saving {
  box-shadow: inset 0 0 0 2px var(--accent);
}

td.is-saving::after {
  content: "Lưu...";
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 8px;
  color: inherit;
}

.cell-disabled {
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
}
