body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl {
  border-color: #dbe3ee !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07) !important;
  overflow: hidden !important;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1) !important;
  border-color: #cbd5e1 !important;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .p-3.sm\:p-4.border-b.border-slate-100.bg-slate-50 {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-bottom-color: #e2e8f0 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  position: relative;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .w-11.h-11.rounded-xl {
  border-radius: 12px !important;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .font-bold.text-slate-900.text-base.leading-tight {
  font-size: 15px !important;
  letter-spacing: 0 !important;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .text-xs.text-slate-500 {
  color: #64748b !important;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .flex.flex-wrap.gap-2.mt-3 {
  gap: 6px !important;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .p-3.bg-white.grid.grid-cols-2.gap-2 {
  gap: 8px !important;
  padding: 12px 10px !important;
  background: #ffffff !important;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .px-3.pb-3 {
  padding: 0 10px 12px !important;
  border-top: 1px solid #eef2f7;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .h-16 {
  height: 52px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .w-full.h-12 {
  height: 44px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

body.attendance-mode .attendance-collapse-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

body.attendance-mode .attendance-card-open .attendance-collapse-toggle {
  transform: rotate(180deg);
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .h-16 svg,
body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .w-full.h-12 svg {
  opacity: 0.9;
}

body.attendance-mode #attendance-search-input {
  border-color: #94a3b8 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.attendance-mode #attendance-search-input:focus {
  border-color: #0f172a !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

@media (min-width: 900px) {
  body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .p-3.bg-white.grid.grid-cols-2.gap-2 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

body.attendance-mode .attendance-quickbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 4px 10px;
}

body.attendance-mode .attendance-quickbar button {
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

body.attendance-mode .attendance-quickbar button:hover {
  background: #f8fafc;
}

body.attendance-mode .attendance-matrix {
  margin: 8px 4px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

body.attendance-mode .attendance-matrix-head {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

body.attendance-mode .attendance-matrix-row {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
}

body.attendance-mode .attendance-matrix-row:last-child {
  border-bottom: 0;
}

body.attendance-mode .attendance-matrix-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

body.attendance-mode .attendance-matrix-name span {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  color: #64748b;
}

body.attendance-mode .attendance-matrix-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

body.attendance-mode .attendance-matrix-actions button {
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
}

body.attendance-mode .attendance-matrix-empty {
  padding: 12px;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 1100px) {
  body.attendance-mode .attendance-quickbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.attendance-mode .attendance-matrix-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.attendance-mode #attendance-search-input {
    height: 44px !important;
    font-size: 15px !important;
  }

  body.attendance-mode .attendance-quickbar {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  body.attendance-mode .attendance-quickbar button {
    height: 42px;
    font-size: 13px;
  }

  body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .h-16 {
    height: 50px !important;
    font-size: 12px !important;
    line-height: 1.15;
    padding-inline: 8px !important;
  }

  body.attendance-mode .space-y-3 > .bg-white.border-slate-200.shadow-sm.overflow-hidden.rounded-xl .w-full.h-12 {
    height: 42px !important;
    font-size: 12px !important;
  }

  body.attendance-mode .attendance-matrix {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.attendance-mode .attendance-matrix-row {
    min-width: 620px;
    grid-template-columns: 180px 1fr;
    align-items: start;
  }

  body.attendance-mode .attendance-matrix-actions {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
  }

  body.attendance-mode .attendance-matrix-actions button {
    height: 34px;
    font-size: 11px;
    padding: 0 6px;
  }
}
