/* Giao bài tập online — trang BẮT ĐẦU của học sinh (/bai/{mã}), giao diện theo mẫu via_1.html.
   Mọi luật đều nằm trong .vs để không ảnh hưởng trang làm bài / kết quả dùng chung hoc-sinh.css. */
.vs {
  --primary: #1e40af; --pending: #f97316;
  --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-500: #64748b; --slate-800: #1e293b;
  min-height: 100vh; background: var(--slate-100); color: var(--slate-800);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: .875rem; line-height: 1.25rem; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.vs *, .vs *::before, .vs *::after { box-sizing: border-box; margin: 0; border: 0 solid #e5e7eb; }
.vs svg { display: block; flex-shrink: 0; }
.vs button { font-family: inherit; cursor: pointer; }

.vs-topbar { height: 64px; border-bottom: 1px solid var(--slate-200); display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 32px; }
.vs-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 9999px; border: 1px solid #93a5d8; background: #e3e9f8; color: var(--primary); font-weight: 700; font-size: .875rem; }
.vs-iconbtn { background: transparent; color: var(--slate-800); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9999px; }
.vs-iconbtn:hover { background: var(--slate-200); }

.vs-page { margin-top: 32px; padding: 0 16px 40px; }
.vs-box { max-width: 560px; margin: 20px auto 0; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.vs-title { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; text-align: center; word-break: break-word; }
.vs-sub { font-size: 1rem; line-height: 1.5rem; font-weight: 500; margin-bottom: 8px; }
.vs-code { display: flex; align-items: center; justify-content: center; margin-top: 8px; font-size: .875rem; font-weight: 500; }
.vs-qr { margin-left: 8px; padding: 4px; background: transparent; color: var(--primary); border-radius: 6px; display: grid; place-items: center; }
.vs-qr:hover { background: var(--slate-100); }

.vs-info { margin-top: 20px; }
.vs-row { display: flex; align-items: center; gap: 12px; font-size: .875rem; line-height: 20px; }
.vs-row + .vs-row { margin-top: 12px; }
.vs-label { display: flex; align-items: center; flex-shrink: 0; }
.vs-label svg { margin-right: 8px; }
.vs-value { margin-left: auto; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.vs-form { margin-top: 20px; }
.vs-field + .vs-field { margin-top: 12px; }
.vs-flabel { display: block; font-weight: 500; margin-bottom: 4px; }
.vs-input { display: block; width: 100%; height: 40px; padding: 0 12px; font: inherit; font-size: 16px; color: inherit; background: #fff; border: 1px solid var(--slate-300); border-radius: 6px; }
.vs-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 64, 175, .15); }
.vs-hint { margin-top: 4px; font-size: .75rem; color: var(--slate-500); }
.vs-alert { margin-top: 16px; padding: 10px 12px; border-radius: 6px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.vs-note { margin-top: 16px; color: var(--slate-800); }
.vs-note + .vs-note { margin-top: 8px; }

.vs-start { width: 100%; margin-top: 20px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--pending); color: #fff; font-weight: 500; font-size: .875rem; border-radius: 6px; text-decoration: none; transition: filter .15s; }
.vs-start svg { margin-left: 4px; }
.vs-start:hover { filter: brightness(.95); }
.vs-danger { width: 100%; margin-top: 12px; height: 38px; background: #fff; color: #b91c1c; border: 1px solid #fca5a5; border-radius: 6px; font-weight: 500; font-size: .875rem; }
.vs-link { display: block; margin: 12px auto 0; background: none; padding: 0; font-size: .875rem; color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.vs-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.vs-files { list-style: none; display: grid; gap: 8px; }
.vs-files__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--slate-200); border-radius: 6px; background: var(--slate-100); overflow-wrap: anywhere; }
.vs-files__item a { color: var(--primary); font-weight: 500; text-decoration: none; flex: 1; min-width: 0; }
.vs-files__size { color: var(--slate-500); font-size: .75rem; white-space: nowrap; }

.vs-history { max-width: 560px; margin: 20px auto 0; }
.vs-btn-history { display: block; width: fit-content; margin: 0 auto; padding: 12px; background: var(--slate-100); color: var(--slate-500); border: 1px solid var(--slate-200); border-radius: 6px; font-weight: 500; font-size: .875rem; line-height: 20px; text-decoration: none; box-shadow: 0 1px 1px rgba(15, 23, 42, .03); }
.vs-btn-history:hover { background: var(--slate-200); }

@media (max-width: 600px) { .vs-topbar { padding: 0 16px; } }