/* ========================================================
   Admin Dashboard Styles - QR 출석 관리 시스템
   ======================================================== */

.admin-layout {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Session Control Banner */
.session-banner {
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.session-select-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-grow: 1;
  min-width: 280px;
}

.session-selector {
  font-size: 1.1rem;
  font-weight: 700;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(99, 102, 241, 0.4);
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.stat-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.progress-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin-top: 0.75rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.85rem 1.4rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Live Feed Ticker */
.live-feed-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.live-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feed-items-container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.feed-item {
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  animation: feedSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes feedSlideIn {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Data Table Container */
.table-card {
  padding: 1.5rem;
  overflow-x: auto;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-input-wrap {
  position: relative;
  min-width: 260px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  white-space: nowrap !important;
}

.data-table th {
  padding: 0.75rem 0.95rem;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap !important;
  vertical-align: middle;
}

.data-table td {
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  white-space: nowrap !important;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Action Dropdown / Buttons */
.status-select {
  padding: 0.3rem 0.6rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
  cursor: pointer;
}

/* PIN Lock Screen Overlay */
.pin-lock-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pin-lock-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.pin-digit-box {
  width: 48px;
  height: 56px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.pin-digit-box.filled {
  border-color: var(--primary-light);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ========================================================
   Admin Dashboard Responsive Styles (PC, Tablet, Mobile)
   ======================================================== */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-layout {
    padding: 1rem 0.85rem;
  }

  .session-banner {
    padding: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .stat-card:nth-child(5) {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .logo-title {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-btn-text {
    display: none;
  }

  .nav-action-btn {
    padding: 0.5rem 0.65rem;
    font-size: 0.95rem;
  }

  .session-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.15rem 1rem;
  }

  .session-select-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }

  .session-selector {
    width: 100%;
    max-width: 100%;
    font-size: 1rem;
  }

  #btn-new-session {
    width: 100%;
    justify-content: center;
  }

  .session-actions {
    width: 100%;
  }

  .session-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .stat-card {
    padding: 1.15rem 1rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-sub {
    font-size: 0.78rem;
  }

  .tab-nav {
    margin-bottom: 1.25rem;
    padding-bottom: 0.25rem;
  }

  .tab-btn {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
  }

  .table-card {
    padding: 1rem 0.75rem;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .table-toolbar .search-input-wrap {
    min-width: 0;
    width: 100%;
  }

  .table-toolbar > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .table-toolbar select,
  .table-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  .data-table {
    min-width: 600px;
    font-size: 0.82rem;
  }

  .data-table th, 
  .data-table td {
    padding: 0.7rem 0.6rem;
    white-space: nowrap;
  }
}

/* ========================================================
   Department Account & Google OTP 2FA Styles
   ======================================================== */

.dept-login-card {
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2rem;
  text-align: center;
}

.dept-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
}

.dept-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.dept-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-normal);
}

.dept-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.dept-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.dept-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.dept-status-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.dept-status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dept-status-pill.inactive {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.dept-pw-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dept-otp-section {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

/* OTP Modal Content */
.otp-modal-box {
  max-width: 480px;
  text-align: center;
}

.otp-qr-wrap {
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--radius-lg);
  display: inline-block;
  margin: 1rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.otp-qr-wrap img {
  display: block;
  width: 200px;
  height: 200px;
}

.otp-secret-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
}

.otp-secret-text {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.1em;
  word-break: break-all;
}

.otp-digit-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  font-weight: 700;
}

/* ==================== 9. 시스템 총괄 관리자 부서별 출결 센터 & 매트릭스 ==================== */
.super-admin-panel {
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.super-admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.panel-icon {
  width: 44px;
  height: 44px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.panel-main-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dept-role-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  border-radius: var(--radius-full);
}

.panel-sub-title {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Department Filter Segment (Pills) */
.dept-filter-segment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1rem;
}

.dept-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dept-segment-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  color: var(--text-main);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.dept-segment-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  font-weight: 700;
}

/* Department Matrix Grid */
.dept-matrix-container {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dept-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.matrix-dept-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.matrix-dept-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, linear-gradient(90deg, #6366f1, #06b6d4));
}

.matrix-dept-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.15);
}

.matrix-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.matrix-dept-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.matrix-dept-emoji {
  font-size: 1.4rem;
}

.matrix-dept-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.matrix-dept-rate-badge {
  font-size: 1.15rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-heading);
}

/* Rate Progress Bar inside card */
.matrix-progress-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.matrix-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
}

/* Mini stat metrics 2x2 grid */
.matrix-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.matrix-mini-stat {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}

.matrix-mini-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.matrix-mini-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.matrix-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.matrix-btn-filter {
  flex: 1;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.matrix-btn-filter:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.matrix-btn-portal {
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.matrix-btn-portal:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* ==================== 성별 선택 버튼 및 배지 스타일 ==================== */
.gender-pill-group {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.gender-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.gender-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.gender-btn.active[data-gender="남"] {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
  color: #93c5fd;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.gender-btn.active[data-gender="여"] {
  background: rgba(244, 63, 94, 0.22);
  border-color: #f43f5e;
  color: #fda4af;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

/* 테이블 내 성별 뱃지 - 이질감 없이 단정한 모던 태그 스타일 */
.badge-gender {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.3;
}

.badge-gender.badge-gender-m,
.badge-gender-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
  white-space: nowrap;
}

.badge-gender.badge-gender-f,
.badge-gender-f {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.28);
  white-space: nowrap;
}

/* 카테고리 / 소속 태그 뱃지 */
.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
}

.category-pill.dept-middle {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}

.category-pill.dept-high {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

/* ==================== 14. 대화형 통계 카드 및 상세 명단 팝업 모달 ==================== */
.stat-card-interactive {
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid #38bdf8 !important;
}

.stat-card-interactive:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 12px 28px -6px rgba(56, 189, 248, 0.25);
}

.stat-card-interactive:active {
  transform: translateY(-1px);
}

.stat-badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: auto;
  transition: all 0.2s ease;
}

.stat-card-interactive:hover .stat-badge-pill {
  background: #38bdf8;
  color: #0b1120;
}

/* 부서 / 학년 및 반별 출석 통계 섹션 */
.breakdown-section-card {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.7) 100%);
  border-radius: var(--radius-lg);
}

.breakdown-header {
  user-select: none;
}

.badge-dept-inline {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.grade-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

.grade-stat-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.grade-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  background: rgba(30, 41, 59, 0.85);
}

.grade-stat-card.active-filter {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.12);
}

.grade-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.grade-stat-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.grade-stat-rate {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
}

.grade-stat-numbers {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.grade-stat-numbers .present-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #22c55e;
}

.progress-bar-mini-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-mini-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  transition: width 0.4s ease;
}

.class-breakdown-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.class-pill-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.class-pill-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(30, 41, 59, 0.9);
  transform: translateY(-2px);
}

.class-pill-card.active-filter {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.badge-class-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* 팝업 모달: 전체 등록 인원 상세 명단 & 통계 */
.modal-box-large {
  max-width: 1000px;
  width: 95vw;
}

.modal-roster-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.summary-chip {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chip-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.chip-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-subtabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.85rem;
  padding-bottom: 0.25rem;
}

.modal-subtab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-subtab-btn:hover {
  color: var(--text-primary);
}

.modal-subtab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.modal-roster-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 시각화 막대 차트 행 (Grade Visual Row) */
.grade-visual-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.grade-visual-row:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.grade-visual-row.active-filter {
  background: rgba(14, 165, 233, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.grade-visual-label-wrap {
  width: 130px;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.grade-visual-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.grade-visual-bar-container {
  flex: 1;
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.35);
  display: flex;
}

.grade-visual-bar-present {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.grade-visual-bar-late {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.grade-visual-rate-pill {
  min-width: 54px;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.02em;
}

.grade-visual-numbers {
  min-width: 140px;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.grade-visual-numbers .present-val {
  color: #10b981;
  font-weight: 800;
  font-size: 0.92rem;
}

/* 전화번호 마스킹 및 보안 텍스트 */
.masked-phone-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: monospace;
  font-size: 0.85rem;
}

.btn-toggle-mask {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-toggle-mask:hover {
  opacity: 1;
}




