/* ========================================================
   2026-2 고급한국어 - Teacher Admin Styles
   Modern, Clean, Academic & Professional LMS Dashboard
   ======================================================== */

.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  margin-bottom: 1.5rem;
}

.admin-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.admin-badge {
  font-size: 0.72rem;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Nav Bar (Segmented Control Style) */
.admin-nav-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  background: #F1F5F9;
  border: 1px solid var(--border);
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.admin-nav-item {
  background: transparent;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.admin-nav-item.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Admin Toolbar */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-lesson-selector {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: white;
  min-width: 240px;
  color: var(--text-main);
}

/* Table Card */
.admin-table-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
}

.admin-table th {
  background: #F8FAFC;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.admin-table tbody tr:hover {
  background: #F8FAFC;
}

/* Backup Grid */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tool-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* Submissions Section */
.submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1rem;
}

.submission-card {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.submission-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
}

.student-name-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.submission-sentences-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sub-sent-row {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-xs);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.sub-sent-num {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.sub-sent-text {
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 500;
}

/* ========================================================
   교사 과제 확인 평가 (O, △, X) 스타일
   ======================================================== */
.grade-action-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-subtle);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.grade-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 0.2rem;
}

.btn-grade {
  border: 1px solid var(--border);
  background: white;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-grade-o {
  color: #059669;
  border-color: #A7F3D0;
}

.btn-grade-o:hover,
.btn-grade-o.active {
  background: #059669;
  color: white;
  border-color: #059669;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.3);
}

.btn-grade-tri {
  color: #D97706;
  border-color: #FDE68A;
}

.btn-grade-tri:hover,
.btn-grade-tri.active {
  background: #D97706;
  color: white;
  border-color: #D97706;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.3);
}

.btn-grade-x {
  color: #DC2626;
  border-color: #FECACA;
}

.btn-grade-x:hover,
.btn-grade-x.active {
  background: #DC2626;
  color: white;
  border-color: #DC2626;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}

.btn-grade-clear {
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
}

/* 매트릭스 테이블 내 평가 뱃지 */
.matrix-cell-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.eval-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease;
  user-select: none;
}

.eval-badge:hover {
  transform: scale(1.05);
}

.eval-badge-o {
  background: #ECFDF5;
  color: #059669;
  border: 1.5px solid #10B981;
}

.eval-badge-tri {
  background: #FFFBEB;
  color: #D97706;
  border: 1.5px solid #F59E0B;
}

.eval-badge-x {
  background: #FEF2F2;
  color: #DC2626;
  border: 1.5px solid #EF4444;
}

.eval-badge-pending {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.eval-badge-none {
  background: #F8FAFC;
  color: #94A3B8;
  border: 1px dashed #CBD5E1;
}

/* Admin Mobile Responsive */
@media (max-width: 768px) {
  .admin-header .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .admin-header .d-flex {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .admin-nav-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 0.35rem;
  }

  .admin-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 다국어 입력 레이아웃 */
.admin-lang-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 0.75rem;
}

@media (max-width: 540px) {
  .admin-lang-inputs-grid {
    grid-template-columns: 1fr;
  }
  .admin-lang-inputs-grid .admin-lang-input-item[style*="span 2"] {
    grid-column: span 1 !important;
  }
}

.admin-lang-input-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-lang-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}

.admin-multi-lang-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  max-width: 320px;
}

.admin-lang-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.35;
}

.admin-lang-row-label {
  flex-shrink: 0;
  font-weight: 700;
  color: #64748B;
  font-size: 0.72rem;
  min-width: 55px;
}

.admin-lang-row-val {
  color: #0F172A;
  font-weight: 600;
  word-break: keep-all;
}

/* 2대 과제 매트릭스 타자 뱃지 스타일 */
.typing-matrix-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 0.25rem;
}

.typing-matrix-badge.completed {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.typing-matrix-badge.completed:hover {
  background: #DBEAFE;
  transform: scale(1.04);
}

.typing-matrix-badge.uncompleted {
  background: #F8FAFC;
  color: #94A3B8;
  border: 1px dashed #CBD5E1;
  cursor: default;
}

.growth-tag {
  color: #059669;
  font-weight: 800;
}

/* ========================================================
   관리자 학생별 리포트 일괄 인쇄 (A4 1페이지) 스타일
   ======================================================== */
#admin-batch-print-container {
  display: none;
}

@page {
  size: A4 portrait;
  margin: 8mm 10mm;
}

@media print {
  html, body {
    background: white !important;
    color: #111 !important;
    font-size: 8.5pt !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 관리자 웹 화면 요소 완전 숨김 */
  .admin-header,
  .admin-nav-bar,
  .admin-panel-section,
  .modal-overlay,
  .btn,
  #login-modal,
  #admin-dashboard > header,
  #admin-dashboard > main > nav,
  #admin-dashboard > main > section {
    display: none !important;
  }

  /* 인쇄 영역만 활성화 */
  #admin-batch-print-container {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-page-wrapper {
    page-break-after: always !important;
    break-after: page !important;
    padding: 0 !important;
    margin: 0 0 15px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .summary-header-doc {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1.5px solid #222 !important;
    padding-bottom: 4px !important;
    margin-bottom: 8px !important;
    gap: 8px !important;
  }

  .summary-doc-title h2 {
    font-size: 1.15rem !important;
    margin: 2px 0 0 0 !important;
    font-weight: 800 !important;
    color: #000 !important;
  }

  .summary-doc-meta-card {
    background: transparent !important;
    border: 1px solid #777 !important;
    padding: 3px 8px !important;
    font-size: 7.5pt !important;
    gap: 2px 8px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(110px, 1fr)) !important;
  }

  .summary-meta-item {
    display: flex !important;
    gap: 4px !important;
  }

  .summary-meta-label {
    font-weight: 700 !important;
    color: #444 !important;
  }

  .summary-meta-value {
    font-weight: 800 !important;
    color: #000 !important;
  }

  .summary-progress-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .summary-stat-card {
    background: transparent !important;
    border: 1px solid #888 !important;
    border-left: 3px solid #333 !important;
    padding: 3px 6px !important;
  }

  .summary-stat-card h4 {
    font-size: 7.5pt !important;
    margin: 0 0 1px 0 !important;
    color: #555 !important;
  }

  .summary-stat-card p {
    font-size: 9pt !important;
    font-weight: 800 !important;
    margin: 0 !important;
  }

  .doc-sub-stat-text {
    font-size: 7.5pt !important;
    margin-top: 1px !important;
  }

  .handout-section-heading {
    font-size: 8.5pt !important;
    font-weight: 800 !important;
    margin: 6px 0 3px 0 !important;
    color: #000 !important;
  }

  .handout-table {
    margin-bottom: 6px !important;
    font-size: 7.5pt !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .handout-table th,
  .handout-table td {
    padding: 2.5px 5px !important;
    border: 1px solid #777 !important;
    line-height: 1.15 !important;
    text-align: left !important;
  }

  .handout-table th {
    background: #f2f2f2 !important;
    color: #000 !important;
    font-weight: 800 !important;
  }

  .summary-sentence-item {
    background: transparent !important;
    border: 1px solid #999 !important;
    padding: 2.5px 6px !important;
    margin-bottom: 3px !important;
    gap: 4px !important;
    font-size: 7.5pt !important;
    display: flex !important;
  }

  .summary-sentence-item .sent-num {
    background: #e2e8f0 !important;
    color: #000 !important;
    font-size: 6.5pt !important;
    padding: 1px 3px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  .summary-sentence-item .sent-text {
    font-size: 7.5pt !important;
    margin: 0 !important;
  }

  .student-sentences-box, .typing-report-box {
    margin-bottom: 6px !important;
  }

  .blank-writing-line {
    border-bottom: 1px dashed #777;
    padding: 3px 0;
    margin-bottom: 2px;
    font-size: 7.5pt;
    color: #444;
  }
}


