/* ==========================================================================
   VOCAB STUDIO PRO - EXCEL LIGHT THEME & MULTI-EXERCISE ENGINE (V2.2)
   Lưới bảng tính chuẩn Excel, hỗ trợ nhiều cặp bài tập độc lập, không giật lag
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --excel-green: #107c41;
  --excel-green-hover: #0b6a37;
  --excel-border: #d1d5db;
  --excel-header-bg: #f8fafc;
  --excel-cell-border: #e2e8f0;
}

body {
  font-family: var(--font-main);
  background-color: #f8fafc;
  color: #0f172a;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Excel Spreadsheet Table Styles */
.excel-grid {
  border-collapse: collapse;
  width: 100%;
  background: #ffffff;
  font-size: 13px;
}

.excel-grid th,
.excel-grid td {
  border: 1px solid #e2e8f0;
  padding: 0;
  white-space: nowrap;
}

/* Row & Column Index Headers */
.excel-col-header {
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 600;
  text-align: center;
  user-select: none;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #cbd5e1 !important;
}

.excel-row-header {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-align: center;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 11px;
  width: 44px;
  min-width: 44px;
}

/* Cell Input Inside Grid */
.excel-cell-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 7px 10px;
  background: transparent;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
}

.excel-cell-input:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #2563eb;
}

/* Highlight Selected Row/Col */
.excel-row-selected td {
  background-color: #eff6ff !important;
}

/* Role Specific Cell Styles */
.cell-student-input {
  background-color: #fefce8 !important; /* Vàng kem mềm cho ô học sinh nhập */
  font-weight: 600;
  color: #1e293b;
}

.cell-student-input:focus {
  box-shadow: inset 0 0 0 2px #eab308 !important;
}

.cell-result-correct {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  font-weight: 700;
}

.cell-result-wrong {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  font-weight: 700;
}

/* KPI Card Styles */
.kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.kpi-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Excel Ribbon Buttons */
.btn-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-ribbon:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.btn-ribbon-primary {
  background: #107c41;
  border-color: #0b6a37;
  color: #ffffff;
}

.btn-ribbon-primary:hover {
  background: #0b6a37;
  color: #ffffff;
}

.btn-ribbon-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-ribbon-danger:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* Excel Bottom Sheets Tabs */
.excel-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  color: #64748b;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
}

.excel-sheet-tab.active {
  background: #ffffff;
  color: #107c41;
  border-bottom-color: #107c41;
}

/* Exercise Target Header Styling */
.target-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
