/* IZI Class — Chấm điểm (2 cột) */
.gr-page { --gr-ink: #17233d; --gr-muted: #6b7489; --gr-line: #e9edf4; --gr-soft: #f6f8fc; --gr-orange: #e8572a; --gr-amber: #e0a100; --gr-blue: #3a7cf6; --gr-purple: #8b3fe0; --gr-update: #f5a400; display: grid; gap: 16px; color: var(--gr-ink); min-width: 0; }
.gr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gr-head h1 { margin: 0; font-size: 30px; }
.gr-tools { position: relative; display: flex; align-items: center; gap: 10px; flex: 1 1 420px; justify-content: flex-end; flex-wrap: wrap; }
.gr-search { flex: 1 1 260px; max-width: 520px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--gr-line); border-radius: 12px; padding: 0 12px; height: 44px; }
.gr-search input { border: 0; outline: none; flex: 1; min-width: 0; font: inherit; background: none; color: var(--gr-ink); }
.gr-search:focus-within { border-color: var(--gr-blue); }
.gr-filter-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--gr-line); background: #fff; cursor: pointer; font-size: 18px; color: #47506a; }
.gr-filter-btn.on { border-color: var(--gr-blue); color: var(--gr-blue); }
.gr-filter-btn em { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--gr-blue); color: #fff; font-size: 11px; font-style: normal; display: grid; place-items: center; padding: 0 4px; }
.gr-filter-panel { position: absolute; top: 54px; right: 0; z-index: 30; width: min(560px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--gr-line); border-radius: 16px; box-shadow: 0 18px 44px rgba(23, 35, 61, .16); padding: 40px 22px 20px; }
.gr-filter-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; color: var(--gr-muted); cursor: pointer; }
.gr-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gr-filter-grid label { display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
.gr-filter-grid .full { grid-column: 1 / -1; }
.gr-filter-grid select, .gr-filter-grid input { height: 44px; border: 0; border-radius: 10px; background: var(--gr-soft); padding: 0 12px; font: inherit; font-weight: 400; color: var(--gr-ink); min-width: 0; }
.gr-filter-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.gr-filter-actions .btn { min-width: 110px; }

.gr-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.gr-col { background: var(--gr-soft); border: 1px solid var(--gr-line); border-radius: 18px; padding: 14px; min-width: 0; }
.gr-col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; color: var(--gr-muted); font-size: 13px; }
.gr-col-head b { color: var(--gr-ink); font-size: 15px; }
.gr-cards { display: grid; gap: 12px; max-height: calc(100vh - 230px); overflow: auto; padding: 2px; }
.gr-card { text-align: left; background: #fff; border: 1.5px solid var(--gr-line); border-radius: 16px; padding: 16px; cursor: pointer; font: inherit; color: inherit; display: grid; gap: 8px; box-shadow: 0 2px 8px rgba(23, 35, 61, .04); }
.gr-card:hover { border-color: #c9d6f5; }
.gr-card.selected { border-color: var(--gr-blue); box-shadow: 0 0 0 3px rgba(58, 124, 246, .14); }
.gr-card:focus-visible { outline: 2px solid var(--gr-blue); outline-offset: 2px; }
.gr-card-top, .gr-sub-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.gr-crumb { color: var(--gr-orange); font-weight: 600; font-size: 14px; }
.gr-crumb i { font-style: normal; margin: 0 4px; }
.gr-card h3 { margin: 0; font-size: 18px; }
.gr-skill { color: var(--gr-amber); font-weight: 600; }
.gr-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--gr-muted); }
.gr-card-meta b { color: var(--gr-ink); }
.gr-ai-count { color: var(--gr-purple); font-weight: 600; }

.gr-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.gr-chip.todo { background: #f1f4f9; color: #2e3a52; border-color: #dfe5ef; }
.gr-chip.done { background: #e8f8ef; color: #127a4c; border-color: #bfe8d1; }
.gr-chip.ai { background: #f4ecff; color: var(--gr-purple); border-color: #dcc6fb; }
.gr-chip.muted { background: #f1f4f9; color: var(--gr-muted); }
.gr-chip.score { background: #22b573; color: #fff; }
.gr-chip.ai-score { background: #fff; color: var(--gr-purple); border-color: #dcc6fb; }

.gr-detail { background: #fff; display: grid; gap: 14px; }
.gr-detail-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 6px 12px; border-bottom: 1px solid var(--gr-line); }
.gr-detail-head h2 { margin: 6px 0 4px; font-size: 22px; }
.gr-detail-head p { margin: 0; color: var(--gr-muted); font-size: 14px; }
.gr-detail-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.gr-sub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gr-sub { border: 1px solid var(--gr-line); border-radius: 16px; padding: 16px; display: grid; gap: 8px; align-content: start; box-shadow: 0 2px 8px rgba(23, 35, 61, .05); }
.gr-sub h3 { margin: 2px 0 0; font-size: 17px; }
.gr-sub p { margin: 0; font-size: 14px; }
.gr-sub-time b { font-weight: 600; }
.gr-late { color: #c4320a; font-weight: 600; font-size: 12px; }
.gr-sub-who { display: grid; gap: 2px; }
.gr-sub-who small { color: var(--gr-muted); overflow-wrap: anywhere; }
.gr-action { margin-top: 6px; height: 44px; border: 0; border-radius: 10px; color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.gr-action.grade { background: var(--gr-blue); }
.gr-action.ai { background: var(--gr-purple); }
.gr-action.update { background: var(--gr-update); }
.gr-action:hover { filter: brightness(1.05); }
.gr-action:focus-visible { outline: 2px solid var(--gr-ink); outline-offset: 2px; }
.gr-missing { border: 1px dashed #d6dce8; border-radius: 12px; padding: 10px 14px; color: var(--gr-muted); }
.gr-missing summary { cursor: pointer; font-weight: 600; }
.gr-missing div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.gr-missing span { display: inline-flex; align-items: center; gap: 6px; color: var(--gr-ink); }
.gr-missing .mini-avatar { font-style: normal; }
.gr-empty { padding: 32px 16px; text-align: center; color: var(--gr-muted); border: 1px dashed #d6dce8; border-radius: 12px; background: #fff; }

.gr-grade-modal { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.gr-grade-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin: 8px 0 4px; }
.gr-grade-body h3 { margin: 0 0 8px; font-size: 15px; }
.gr-work-text, .gr-answers { background: #f6f8fc; border: 1px solid #e9edf4; border-radius: 12px; padding: 14px 16px; max-height: 360px; overflow: auto; margin: 0; }
.gr-answers { padding-left: 34px; }
.gr-file { display: block; padding: 12px; border: 1px solid #e9edf4; border-radius: 10px; margin-bottom: 8px; color: #3465e8; }
.gr-muted { color: #6b7489; }
.gr-grade-body aside { display: grid; gap: 14px; align-content: start; }
.gr-ai-box { background: #f6efff; border: 1px solid #dcc6fb; border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; color: #5b2a9e; }
.gr-ai-box p { margin: 0; color: #47506a; font-size: 13px; }
.gr-ai-box .btn { justify-self: start; }
.gr-score, .gr-feedback { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.gr-score div { display: flex; align-items: center; gap: 8px; }
.gr-score input { width: 110px; height: 42px; border: 1px solid #d6dce8; border-radius: 10px; padding: 0 12px; font: inherit; font-size: 18px; font-weight: 700; }
.gr-feedback textarea { border: 1px solid #d6dce8; border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 400; resize: vertical; }
.gr-btn-ai { background: #8b3fe0 !important; color: #fff !important; border-color: transparent !important; }
.gr-btn-update { background: #f5a400 !important; color: #fff !important; border-color: transparent !important; }

@media (max-width: 900px) {
  .gr-layout { grid-template-columns: 1fr; }
  .gr-cards { max-height: none; }
  .gr-grade-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .gr-filter-grid { grid-template-columns: 1fr; }
  .gr-head h1 { font-size: 24px; }
  .gr-filter-panel { position: fixed; top: 70px; left: 16px; right: 16px; width: auto; }
}

.gr-sub-who i { font-style: normal; color: var(--gr-muted); }

/* Đồng bộ điểm lên Classroom */
.gr-sync { margin: 0; font-size: 13px; color: #b54708; }
.gr-sync.ok { color: #127a4c; }
.gr-link { border: 0; background: none; padding: 0; color: #3a7cf6; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.gr-sync-modal { width: min(420px, calc(100vw - 32px)); text-align: center; padding: 26px 24px 22px; }
.gr-sync-modal h2 { margin: 10px 0 8px; font-size: 20px; }
.gr-sync-modal p { margin: 0 0 18px; color: #47506a; font-size: 14px; line-height: 1.5; }
.gr-sync-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #e8f0ff; color: #3a7cf6; font-size: 22px; font-weight: 700; }
.gr-sync-actions { display: flex; gap: 10px; justify-content: center; }
.gr-sync-actions .btn { min-width: 130px; }

/* Báo cáo lần làm gần nhất (giáo viên) */
.gr-report-link { justify-self: start; font-size: 13px; text-decoration: none; }
.gr-report-modal { width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; background: #f5f6f8; }
.gr-report-body .tr-head { display: none; }
.gr-report-body .tr-card { margin-bottom: 14px; }
