/* ========================================================
   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: 0.95rem;
  font-weight: 600;
  background: var(--bg-surface);
  border-color: rgba(56, 189, 248, 0.45);
}

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

/* Table Card Header Alignment (Title & Buttons perfectly inline) */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-header-row h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

.header-btn-group {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-btn-group .btn,
.btn-header-action {
  height: 32px !important;
  font-size: 0.8rem !important;
  padding: 0.35rem 0.75rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  border-radius: var(--radius-sm, 6px) !important;
}

.card-desc-sub {
  color: var(--text-secondary);
  font-size: 0.84rem;
  margin-top: 0.15rem;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

/* 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: var(--bg-elevated);
  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 - 1/3 컴팩트 슬림 바 스타일링 */
.live-feed-card {
  margin-bottom: 1.15rem;
  padding: 0.42rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
}

.live-feed-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #34d399 100%);
  opacity: 0.85;
}

.live-feed-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  flex-shrink: 0;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border-subtle);
}

.live-feed-title {
  font-weight: 800;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
  white-space: nowrap;
}

.live-feed-title-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  height: 32px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm, 6px);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1;
  white-space: nowrap;
}

.live-feed-title-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: #0369A1;
  transform: translateY(-1px);
}

.live-feed-title-btn:active {
  transform: translateY(0);
}

.live-feed-title-btn.admin-mode {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
  color: #92400E;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.22);
}

.live-feed-title-btn.admin-mode:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
}

.live-feed-admin-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  animation: feedBtnFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes feedBtnFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateX(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: livePulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.16rem 0.52rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #046E50;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.feed-items-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.1rem 0;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
}

.feed-items-container::-webkit-scrollbar {
  height: 3px;
}
.feed-items-container::-webkit-scrollbar-track {
  background: var(--bg-surface);
  border-radius: 10px;
}
.feed-items-container::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 10px;
}

.feed-item {
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  animation: feedSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.feed-item:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.55);
  background: var(--bg-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.feed-empty-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.1rem 0;
  white-space: nowrap;
}

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

/* 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.85rem 1rem;
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid rgba(56, 189, 248, 0.35);
  white-space: nowrap !important;
  vertical-align: middle;
}

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

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

.data-table tbody tr:nth-child(even) {
  background: var(--bg-elevated);
}

.data-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08) !important;
}

/* Action Dropdown / Buttons */
.status-select {
  padding: 0.3rem 0.6rem;
  background: var(--bg-surface);
  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: var(--bg-surface);
  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: var(--bg-surface);
  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: #046E50;
  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: var(--bg-elevated);
  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: var(--bg-surface);
  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: var(--bg-surface);
  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: #92400E;
  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: var(--bg-surface);
  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: var(--bg-surface);
  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 var(--border-subtle);
}

.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: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  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: #0369A1;
  font-family: var(--font-heading);
}

/* Rate Progress Bar inside card */
.matrix-progress-wrap {
  height: 6px;
  background: var(--bg-elevated);
  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: var(--bg-elevated);
  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: var(--primary);
  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: var(--bg-elevated);
  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: var(--bg-elevated);
  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: var(--bg-surface);
  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: var(--bg-elevated);
  color: var(--text-main);
}

.gender-btn.active[data-gender="남"] {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
  color: #1D4ED8;
  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: #BE123C;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

/* 학생명 옆 성별 기호 (♀ / ♂) 인라인 표시 */
.student-name-text {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
  vertical-align: middle;
}

.gender-symbol {
  display: inline-block;
  margin-left: 0.35rem;
  font-weight: 800;
  font-size: 1.05em;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}

.gender-symbol.gender-f {
  color: #BE185D;
  text-shadow: 0 0 6px rgba(244, 114, 182, 0.45);
}

.gender-symbol.gender-m {
  color: #0369A1;
  text-shadow: 0 0 6px rgba(56, 189, 248, 0.45);
}

/* 테이블 내 성별 뱃지 - 세련되고 감각적인 프리미엄 벡터 아이콘 배지 */
.badge-gender {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.24rem 0.68rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap !important;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  backdrop-filter: blur(4px);
}

.badge-gender.badge-gender-m,
.badge-gender-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.24rem 0.68rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: #1D4ED8;
  border: 1px solid rgba(96, 165, 250, 0.45);
  white-space: nowrap !important;
}

.badge-gender.badge-gender-m:hover,
.badge-gender-m:hover {
  background: var(--primary-soft);
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.badge-gender.badge-gender-f,
.badge-gender-f {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.24rem 0.68rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(225, 29, 72, 0.12));
  color: #BE123C;
  border: 1px solid rgba(244, 114, 182, 0.45);
  white-space: nowrap !important;
}

.badge-gender.badge-gender-f:hover,
.badge-gender-f:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.32), rgba(225, 29, 72, 0.2));
  border-color: #f472b6;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
  transform: translateY(-1px);
}

.gender-icon-svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.badge-gender-m .gender-icon-svg {
  filter: drop-shadow(0 0 3px rgba(96, 165, 250, 0.5));
}

.badge-gender-f .gender-icon-svg {
  filter: drop-shadow(0 0 3px rgba(244, 114, 182, 0.5));
}

.gender-btn .gender-icon-svg {
  width: 16px;
  height: 16px;
}

/* 사용자 지정 M/W 타일 아이콘 스타일 */
.gender-badge-img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.gender-btn-img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gender-stat-img {
  width: 18px;
  height: 18px;
  border-radius: 3.5px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* 카테고리 / 소속 태그 뱃지 */
.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: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

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

/* ==================== 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: var(--bg-surface);
  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;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  margin-left: auto;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.stat-badge-pill.pill-cyan {
  color: #0369A1;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}
.stat-badge-pill.pill-cyan:hover {
  background: #38bdf8;
  color: #0b1120;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.stat-badge-pill.pill-green {
  color: #046E50;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}
.stat-badge-pill.pill-green:hover {
  background: #10b981;
  color: #0b1120;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.stat-badge-pill.pill-yellow {
  color: #92400E;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}
.stat-badge-pill.pill-yellow:hover {
  background: #f59e0b;
  color: #0b1120;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.stat-badge-pill.pill-gray {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.5);
  font-weight: 700;
}
.stat-badge-pill.pill-gray:hover {
  background: #94a3b8;
  color: #0b1120;
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.5);
  transform: translateY(-1px);
}

.stat-badge-pill.pill-purple {
  color: #6D28D9;
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
}
.stat-badge-pill.pill-purple:hover {
  background: #a855f7;
  color: var(--text-main);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

/* 생년월일 기준 및 빠른 프리셋 버튼 */
.btn-birth-preset {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-birth-preset:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #0369A1;
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-birth-preset.active {
  background: #0284c7;
  color: var(--text-main);
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* 학교 추가 뱃지 & 버튼 */
.btn-school-add-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369A1;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.55rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-school-add-pill:hover {
  background: #0284c7;
  color: var(--text-main);
  border-color: #38bdf8;
}

.badge-school-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(14, 165, 233, 0.12);
  color: #0369A1;
  border: 1px solid rgba(14, 165, 233, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.badge-school-pill:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.28);
}

/* 부서 / 학년 및 반별 출석 통계 섹션 */
.breakdown-section-card {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  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: var(--primary);
  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: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  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: var(--bg-surface);
}

.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: #0369A1;
}

.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: #126E35;
}

.progress-bar-mini-wrap {
  width: 100%;
  height: 5px;
  background: var(--bg-elevated);
  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: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  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: var(--bg-surface);
  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: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-teacher-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(147, 51, 234, 0.15);
  color: #6D28D9;
  border: 1px solid rgba(192, 132, 252, 0.35);
  white-space: nowrap !important;
}

.badge-teacher-pill:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: #c084fc;
}

/* 팝업 모달: 전체 등록 인원 상세 명단 & 통계 */
.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: var(--bg-surface);
  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 var(--border-subtle);
  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: #0369A1;
  border-bottom-color: #38bdf8;
}

.modal-roster-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-surface);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.grade-visual-row:hover {
  background: var(--bg-surface);
  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: var(--bg-elevated);
  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: #0369A1;
  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: #046E50;
  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;
}

/* ==================== 학교 관리 & 헌금 관리 스타일 ==================== */
.badge-school-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-school-type.type-middle {
  background: rgba(56, 189, 248, 0.15);
  color: #0369A1;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-school-type.type-high {
  background: rgba(168, 85, 247, 0.15);
  color: #6D28D9;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-school-type.type-elementary {
  background: rgba(16, 185, 129, 0.15);
  color: #046E50;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-school-type.type-etc {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-weight: 700;
}

/* 헌금 및 출석 관리 요약 대시보드 그리드 */
.offering-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .offering-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .offering-summary-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
  }
}

/* 헌금현황 총 헌금 집계 1줄 와이드 카드 */
.total-offering-row-card {
  padding: 1.15rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid #818cf8;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid rgba(129, 140, 248, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.total-offering-row-card:hover {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

/* 헌금현황 2행: 주일 헌금 라인 (세부 분할 카드 - 출석현황 형식) */
.offering-split-card {
  padding: 1.15rem 1.35rem;
  border-left: 4px solid #38bdf8;
  margin-bottom: 1.35rem;
  position: relative;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease;
}

.offering-split-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.15);
}

.offering-split-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  text-align: left;
  background: var(--bg-surface);
  padding: 0.75rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.offering-split-cell {
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  transition: all 0.18s ease;
  user-select: none;
}

.offering-split-cell:not(:first-child) {
  border-left: 1px solid var(--border-subtle);
}

.offering-split-cell [id^="offering-stat-"] {
  text-align: right !important;
}

.offering-split-cell:hover {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.offering-split-cell.active-filter {
  background: rgba(56, 189, 248, 0.15);
  outline: 1px solid rgba(56, 189, 248, 0.4);
}

@media (max-width: 992px) {
  .offering-split-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem;
  }
  .offering-split-cell:nth-child(4) {
    border-left: none;
  }
}

@media (max-width: 640px) {
  .offering-split-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .offering-split-cell:nth-child(even) {
    border-left: 1px solid var(--border-subtle);
  }
  .offering-split-cell:nth-child(odd) {
    border-left: none;
  }
}

/* ========================================================
   통합 세부 집계 카드 시스템 (Unified Split Card System)
   - 헌금현황의 주일 헌금 및 항목별 세부 집계 영역과 동일한 구조
   - 상단 헤더: 좌측(아이콘+타이틀+설명) / 우측(뱃지)
   - 세부 집계 셀: 타이틀 좌측 상단 정렬, 주요 수치 및 보조지표 우측 정렬
   ======================================================== */
.unified-split-card {
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.35rem;
  position: relative;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease;
}

.unified-split-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.unified-split-grid {
  display: grid;
  gap: 0.4rem;
  text-align: left;
  background: var(--bg-surface);
  padding: 0.65rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.unified-split-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.unified-split-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.unified-split-grid.cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

.unified-split-cell {
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  transition: all 0.18s ease;
  user-select: none;
}

.unified-split-cell:not(:first-child) {
  border-left: 1px solid var(--border-subtle);
}

.unified-split-cell:hover {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.unified-split-cell.active-stat-card,
.unified-split-cell.active-filter {
  background: rgba(56, 189, 248, 0.16) !important;
  outline: 1px solid rgba(56, 189, 248, 0.45) !important;
}

@media (max-width: 992px) {
  .unified-split-grid.cols-4,
  .unified-split-grid.cols-5,
  .unified-split-grid.cols-6 {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem;
  }
  .unified-split-cell:nth-child(4) {
    border-left: none;
  }
}

@media (max-width: 640px) {
  .unified-split-grid.cols-4,
  .unified-split-grid.cols-5,
  .unified-split-grid.cols-6 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .unified-split-cell:nth-child(even) {
    border-left: 1px solid var(--border-subtle);
  }
  .unified-split-cell:nth-child(odd) {
    border-left: none;
  }
}

/* 세부 집계 카드 내부에 통합된 부서별 통계 그리드 스타일 */
.unified-split-card .dept-comparison-grid {
  margin-bottom: 0.85rem !important;
}

.unified-split-card .dept-comparison-grid .stat-dept-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.unified-split-card .dept-comparison-grid .stat-dept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* 헌금현황 하단 5열 그리드 (하위 호환) */
.offering-5cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .offering-5cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 768px) {
  .offering-5cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
}

@media (max-width: 480px) {
  .offering-5cards-grid {
    grid-template-columns: 1fr;
  }
}

.offering-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.offering-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.offering-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.offering-card-amount {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  letter-spacing: -0.02em;
}

/* 핵심 지표 단위(명, 원 등) 스타일: 숫자보다 작고 단정하게 표시 */
.offering-card-amount .stat-unit,
.stat-value .stat-unit,
.stat-unit {
  font-size: 0.58em;
  font-weight: 700;
  margin-left: 0.18rem;
  letter-spacing: -0.01em;
  opacity: 0.88;
  vertical-align: baseline;
  display: inline-block;
}

.offering-card-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-weight: 500;
  text-align: right;
}

.badge-offering-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-offering-cat.cat-sunday {
  background: rgba(56, 189, 248, 0.2);
  color: #0369A1;
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.badge-offering-cat.cat-thanks {
  background: rgba(245, 158, 11, 0.2);
  color: #92400E;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.badge-offering-cat.cat-tithe {
  background: rgba(168, 85, 247, 0.2);
  color: #6D28D9;
  border: 1px solid rgba(168, 85, 247, 0.5);
}

.badge-offering-cat.cat-mission {
  background: rgba(16, 185, 129, 0.2);
  color: #046E50;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.badge-offering-cat.cat-special {
  background: rgba(244, 63, 94, 0.2);
  color: #BE123C;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

/* 헌금 금액 빠른 입력 프리셋 버튼 */
.btn-amount-preset {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #1D4ED8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-amount-preset:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  color: var(--text-main);
}

/* 학생 등록 모달 출생년도 표시 박스 */
.birth-year-display {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  font-weight: 800;
  color: #0369A1;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ========================================================
   대시보드 2행 매트릭스 레이아웃 (출석 & 헌금 좌측 세로 라벨)
   ======================================================== */
.dashboard-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.dashboard-matrix-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.dashboard-row-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.25rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-align: center;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

.dashboard-row-label.label-attendance {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.18) 0%, rgba(14, 165, 233, 0.28) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #0369A1;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.dashboard-row-label.label-offering {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.18) 0%, rgba(99, 102, 241, 0.28) 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.45);
  color: var(--primary);
  text-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
}

.dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  flex-grow: 1;
}

.dashboard-cards-grid.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.dashboard-cards-grid .stat-card {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}

.dashboard-cards-grid .stat-label {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.dashboard-cards-grid .stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  letter-spacing: -0.02em;
}

.dashboard-cards-grid .stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-align: right;
}

/* 카드 라벨 타이틀 & 아이콘 (스케치: '아이콘 넣고') */
.stat-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.stat-title-wrap .stat-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* 돋보기 아이콘 및 상호작용 (상세) */
.stat-hover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.12rem;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  line-height: 1;
}

.stat-hover-btn .btn-icon {
  font-size: 0.65rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-hover-btn .btn-hover-text {
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: max-width 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.16s ease;
  margin-left: 0;
  display: inline-block;
  overflow: hidden;
}

.stat-hover-btn:hover,
.stat-hover-btn:focus-visible,
.stat-hover-btn:active {
  width: auto;
  padding: 0.16rem 0.45rem;
  gap: 0.2rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.stat-hover-btn:hover .btn-hover-text,
.stat-hover-btn:focus-visible .btn-hover-text,
.stat-hover-btn:active .btn-hover-text {
  max-width: 45px;
  opacity: 1;
  margin-left: 0.14rem;
}

.stat-hover-btn:active {
  transform: scale(0.92);
}

.stat-hover-btn.pill-cyan {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #0369A1;
}
.stat-hover-btn.pill-cyan:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.stat-hover-btn.pill-green {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #046E50;
}
.stat-hover-btn.pill-green:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.stat-hover-btn.pill-yellow {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #92400E;
}
.stat-hover-btn.pill-yellow:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.stat-hover-btn.pill-gray {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text-secondary);
}
.stat-hover-btn.pill-gray:hover {
  background: rgba(148, 163, 184, 0.28);
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.35);
}

.stat-hover-btn.pill-purple {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #6D28D9;
}
.stat-hover-btn.pill-purple:hover {
  background: rgba(168, 85, 247, 0.28);
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

.stat-hover-btn.pill-indigo {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--primary);
}
.stat-hover-btn.pill-indigo:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.stat-hover-btn.pill-pink {
  background: rgba(244, 114, 182, 0.15);
  border-color: rgba(244, 114, 182, 0.4);
  color: #BE185D;
}
.stat-hover-btn.pill-pink:hover {
  background: rgba(244, 114, 182, 0.28);
  border-color: rgba(244, 114, 182, 0.7);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.35);
}

.stat-hover-btn.pill-red {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #BE123C;
}
.stat-hover-btn.pill-red:hover {
  background: rgba(244, 63, 94, 0.28);
  border-color: rgba(244, 63, 94, 0.7);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

@media (max-width: 1440px) {
  .dashboard-cards-grid.grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1280px) {
  .dashboard-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .dashboard-cards-grid.grid-6 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-matrix-row {
    flex-direction: column;
  }
  .dashboard-row-label {
    width: 100%;
    min-width: auto;
    flex-direction: row;
    height: 38px;
    letter-spacing: 0.4em;
    gap: 0.5rem;
  }
}

/* ========================================================
   좌측 세로 사이드바 메뉴 & 우측 메인 영역 레이아웃
   ======================================================== */
.admin-dashboard-wrapper {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  width: 100%;
}

.admin-sidebar {
  width: 215px;
  min-width: 215px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: sticky;
  top: 1rem;
  z-index: 20;
}

.sidebar-header-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* 각 항목을 카드처럼 배치 (스케치: '이 항목 들은 왼쪽으로 배치 카드처럼') */
.sidebar-tab-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
}

.sidebar-tab-card:hover {
  background: var(--bg-surface);
  border-color: rgba(99, 102, 241, 0.4);
  border-left-color: #818cf8;
  color: var(--text-main);
  transform: translateX(4px) translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.sidebar-tab-card.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.26) 0%, rgba(59, 130, 246, 0.18) 100%);
  border-color: rgba(99, 102, 241, 0.55);
  border-left: 4px solid #818cf8;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3), inset 0 0 14px rgba(99, 102, 241, 0.12);
}

.sidebar-tab-card .tab-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-elevated);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-tab-card:hover .tab-icon {
  transform: scale(1.12);
}

.sidebar-tab-card.active .tab-icon {
  background: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.sidebar-tab-card .tab-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sidebar-tab-card .tab-title {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.sidebar-tab-card .tab-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-tab-card.active .tab-desc {
  color: var(--primary);
}

.admin-main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .admin-dashboard-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    min-width: auto;
    position: static;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .sidebar-tab-card {
    width: auto;
    flex: 1 1 calc(33.333% - 0.45rem);
    min-width: 150px;
  }
}

@media (max-width: 640px) {
  .sidebar-tab-card {
    flex: 1 1 calc(50% - 0.45rem);
  }
}

/* ==================== 실시간 둥근 통계 그래프 매트릭스 ==================== */
.dashboard-round-charts-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-round-charts-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.round-chart-card {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.round-chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-color: rgba(56, 189, 248, 0.55);
}

.round-chart-zoom-hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.16rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
}

.round-chart-card:hover .round-chart-zoom-hint {
  color: #0369A1;
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.round-chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.round-chart-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}

.round-chart-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.round-chart-badge.badge-blue {
  background: rgba(56, 189, 248, 0.2);
  color: #0369A1;
  border: 1px solid rgba(56, 189, 248, 0.5);
}
.round-chart-badge.badge-cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #0D6982;
  border: 1px solid rgba(6, 182, 212, 0.5);
}
.round-chart-badge.badge-pink {
  background: rgba(244, 114, 182, 0.2);
  color: #BE185D;
  border: 1px solid rgba(244, 114, 182, 0.5);
}
.round-chart-badge.badge-green {
  background: rgba(16, 185, 129, 0.2);
  color: #046E50;
  border: 1px solid rgba(16, 185, 129, 0.5);
}
.round-chart-badge.badge-purple {
  background: rgba(168, 85, 247, 0.2);
  color: #6D28D9;
  border: 1px solid rgba(168, 85, 247, 0.5);
}
.round-chart-badge.badge-indigo {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.5);
}
.round-chart-badge.badge-yellow {
  background: rgba(245, 158, 11, 0.2);
  color: #854D0E;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.round-chart-visual {
  min-height: 142px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0.35rem 0 0.85rem 0;
}

.round-chart-visual svg {
  overflow: visible;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.round-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  max-height: 130px;
  overflow-y: auto;
}

.round-chart-legend::-webkit-scrollbar {
  width: 5px;
}
.round-chart-legend::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  line-height: 1.35;
}

.legend-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.legend-val {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.85rem;
  white-space: nowrap;
}

.legend-pct {
  color: #0369A1;
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

@media (max-width: 1280px) {
  .dashboard-round-charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .dashboard-round-charts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== 학사관리 3대 통합 컴팩트 카드 및 바둑판 달력 칸 스타일 ==================== */
.academics-cards-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 960px) {
  .academics-cards-compact-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.acad-compact-card {
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 0.95rem;
  cursor: pointer;
}

.acad-compact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(139, 92, 246, 0.45);
}

.acad-compact-card.active-filter {
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45) !important;
  border-color: #a855f7 !important;
}

.acad-compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
}

.acad-compact-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}

.acad-compact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.acad-compact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.32rem 0.55rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.acad-compact-row:hover {
  background: var(--bg-surface);
  border-color: rgba(139, 92, 246, 0.4);
}

.acad-compact-row.active-row-filter {
  background: rgba(139, 92, 246, 0.22) !important;
  border-color: #a855f7 !important;
}

.acad-row-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.acad-row-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.tag-mid {
  background: rgba(245, 158, 11, 0.22);
  color: #854D0E;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.tag-fin {
  background: rgba(239, 68, 68, 0.22);
  color: #BE123C;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.tag-mid2 {
  background: rgba(234, 88, 12, 0.22);
  color: #AF3B0B;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

.tag-fin2 {
  background: rgba(139, 92, 246, 0.22);
  color: #6D28D9;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.tag-summer {
  background: rgba(6, 182, 212, 0.22);
  color: #0D6982;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.tag-winter {
  background: rgba(59, 130, 246, 0.22);
  color: #1D4ED8;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.acad-row-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.acad-row-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  font-weight: 800;
  flex-shrink: 0;
}

/* 학사일정 중고등부 선택 탭 버튼 */
.acad-dept-tab-btn {
  padding: 0.32rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.acad-dept-tab-btn {
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
}

.acad-dept-tab-btn:hover {
  background: var(--bg-elevated) !important;
  color: var(--text-main) !important;
}

.acad-dept-tab-btn.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.chip-dept-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.06rem 0.28rem;
  border-radius: 3px;
  margin-right: 3px;
  line-height: 1;
}

.chip-dept-tag.tag-middle {
  background: rgba(16, 185, 129, 0.28);
  color: #046E50;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.chip-dept-tag.tag-high {
  background: rgba(168, 85, 247, 0.28);
  color: #6D28D9;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.acad-cal-chip.chip-middle {
  border-left: 2.5px solid #10b981 !important;
}

.acad-cal-chip.chip-high {
  border-left: 2.5px solid #c084fc !important;
}

/* ==================== 바둑판 칸 구조 캘린더 (Table Frame & Grid Cells) ==================== */
.acad-calendar-table-frame {
  background: var(--bg-surface);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.acad-cal-weekday-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-surface);
  border-bottom: 2px solid rgba(139, 92, 246, 0.45);
  font-weight: 800;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.65rem 0;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.acad-cal-weekday-bar .col-sun {
  color: #BE123C;
}

.acad-cal-weekday-bar .col-sat {
  color: #1D4ED8;
}

.acad-calendar-boxed-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: rgba(139, 92, 246, 0.22); /* 칸 구분 격자선 색상 */
}

.acad-cal-day-cell {
  min-height: 100px;
  background: var(--bg-surface);
  padding: 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.acad-cal-day-cell:hover {
  background: var(--bg-surface);
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.6);
  z-index: 2;
}

.acad-cal-day-cell.other-month {
  background: var(--bg-surface) !important;
  opacity: 0.36;
}

.acad-cal-day-cell.is-today {
  background: var(--bg-surface) !important;
  box-shadow: inset 0 0 0 1.5px #38bdf8, 0 0 14px rgba(56, 189, 248, 0.25) !important;
}

.acad-cal-day-cell.has-events {
  cursor: pointer;
}

.acad-cal-day-cell.has-events:hover {
  border-color: #a855f7;
  box-shadow: inset 0 0 0 1.5px rgba(168, 85, 247, 0.8), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.acad-cell-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.acad-cell-date-num {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.is-today-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #38bdf8;
  color: #0b1120 !important;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.76rem;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

.acad-today-badge {
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.22);
  color: #0369A1;
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  letter-spacing: -0.01em;
}

.acad-day-school-count {
  font-size: 0.64rem;
  font-weight: 800;
  color: #6D28D9;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
}

.acad-cell-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.acad-cal-chip {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 0.16rem 0.38rem;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.acad-cal-chip .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-school-count {
  font-size: 0.62rem;
  font-weight: 800;
  background: var(--bg-elevated);
  padding: 0 0.3rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.acad-cal-chip-exam {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.18) 100%);
  color: #854D0E;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.acad-cal-chip-vacation {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.22) 0%, rgba(2, 132, 199, 0.18) 100%);
  color: #0369A1;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.acad-cal-chip-event {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.22) 0%, rgba(147, 51, 234, 0.18) 100%);
  color: #6D28D9;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.acad-cal-chip-general {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.18) 100%);
  color: #047857;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.acad-cal-more-pill {
  font-size: 0.63rem;
  font-weight: 800;
  color: #6D28D9;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 4px;
  padding: 2px 4px;
  text-align: center;
  margin-top: 1px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.acad-cal-more-pill:hover {
  background: rgba(139, 92, 246, 0.35);
  color: var(--text-main);
}

@media (max-width: 768px) {
  .acad-cal-day-cell {
    min-height: 70px;
    padding: 0.25rem;
  }
  .acad-cell-top {
    margin-bottom: 0.15rem;
  }
  .acad-cell-date-num {
    font-size: 0.74rem;
  }
  .is-today-circle {
    width: 18px;
    height: 18px;
    font-size: 0.68rem;
  }
  .acad-cal-chip {
    font-size: 0.62rem;
    padding: 0.1rem 0.25rem;
  }
  .acad-cal-weekday-bar {
    font-size: 0.72rem;
    padding: 0.45rem 0;
  }
}

/* ==================== 관리 탭 공통 상단 통계 요약 카드 그리드 (학생/선생님/학교관리) ==================== */
.admin-tab-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .admin-tab-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .admin-tab-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.admin-stat-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-stat-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-color: rgba(139, 92, 246, 0.45);
}

.admin-stat-summary-card.active-stat-card {
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.45) !important;
  border-color: #a855f7 !important;
  background: var(--bg-surface) !important;
}

.admin-stat-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.admin-stat-card-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.admin-stat-card-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}




/* ---- 반응형 보정: 탭 내용이 넓어도 화면 폭을 넘지 않도록 (표는 가로 스크롤) ---- */
.admin-dashboard-wrapper, .admin-dashboard-wrapper > * { min-width: 0; max-width: 100%; }
.admin-main-area { width: 100%; max-width: 100%; align-self: stretch; }
.tab-content, .tab-content > * { min-width: 0; max-width: 100%; }
.tab-content .table-card, .tab-content .glass-card { overflow-x: auto; }
.tab-content table { max-width: none; }
@media (max-width: 768px) {
  .tab-content .glass-card { padding-left: .9rem; padding-right: .9rem; }
  .tab-content h2, .tab-content h3 { word-break: keep-all; }
}
