/* PlanMyClass – UI styles */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1d2433;
  --muted: #667085;
  --line: #e3e6ec;
  --brand: #1f5fbf;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0fc;
  --ok: #167a4a;
  --ok-soft: #e4f5ec;
  --warn: #a15c00;
  --warn-soft: #fdf1dc;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Layout */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: #14213d; color: #cfd8ea; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; }
.brand img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.brand b { font-size: 16px; display: block; }
.brand span { font-size: 11px; color: #9fb0d0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #cfd8ea; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; }
.nav .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7f8fb0; margin: 14px 10px 6px; }
.nav svg { width: 18px; height: 18px; flex: none; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .search { flex: 1; max-width: 420px; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; }
.content { padding: 24px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.menu-toggle { display: none; }

/* Cards & grids */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flat { box-shadow: none; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .num { font-size: 26px; font-weight: 700; }
.kpi .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* Forms */
label { display: block; font-weight: 600; font-size: 13px; color: #344054; }
label .hint { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 8px; font: inherit; color: inherit; background: #fff; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 6px 0 0; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .editor:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.check { display: inline-flex; align-items: center; font-weight: 500; margin-right: 14px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid #cfd4dc; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f2f4f7; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #194f9f; }
.btn.danger { color: var(--bad); border-color: #f3b4ae; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 4px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: #fafbfc; }
table.data tr:hover td { background: #fafbff; }
table.data td.num { white-space: nowrap; }

/* Badges & bars */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: #eef1f5; color: #475467; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand); }
.bar { height: 8px; background: #eaecf0; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.ok > i { background: var(--ok); }

/* Alerts, toasts, modal */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--brand-soft); color: #173f7a; }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1d2433; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 380px; }
.toast.error { background: var(--bad); }
.toast.ok { background: var(--ok); }
.modal-back { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(720px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { width: min(1000px, 100%); }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal header h3 { margin: 0; }
.modal .body { padding: 18px 20px; overflow-y: auto; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-color: var(--brand); }

/* Lesson editor in institute format */
.lp-table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
.lp-table td, .lp-table th { border: 1px solid #98a2b3; padding: 8px 10px; vertical-align: top; }
.lp-table .lbl { font-weight: 700; background: #fafbfc; }
.lp-table textarea, .lp-table input { margin: 0; border-color: transparent; background: transparent; padding: 4px; min-height: 0; }
.lp-table textarea:hover, .lp-table input:hover { border-color: #e3e6ec; }
.lp-table textarea:focus, .lp-table input:focus { background: #fff; }
.editor-wrap { border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; }
.editor-tools { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: #fafbfc; border-radius: 8px 8px 0 0; }
.editor-tools button { border: 0; background: none; padding: 4px 8px; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 600; min-width: 30px; }
.editor-tools button:hover { background: #eaecf0; }
.editor { min-height: 160px; padding: 10px 12px; outline: none; }
.editor p { margin: 0 0 6px; }
.editor ul, .editor ol { margin: 0 0 6px; padding-left: 22px; }
.content-html p { margin: 0 0 8px; }
.content-html ul, .content-html ol { margin: 0 0 8px; padding-left: 22px; }
.content-html h4 { margin: 12px 0 4px; }

/* Images */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.img-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.img-card img { width: 100%; height: 140px; object-fit: contain; background: #f2f4f7; cursor: zoom-in; }
.img-card .meta { padding: 8px; font-size: 12px; flex: 1; }
.img-card .meta .t { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.img-card .acts { display: flex; gap: 6px; padding: 0 8px 8px; flex-wrap: wrap; align-items: center; }
.img-card.picked { outline: 3px solid var(--brand); }
.lightbox img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; }

/* Units in course page */
.unit { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.unit-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #fafbfc; border-radius: 8px 8px 0 0; flex-wrap: wrap; }
.unit-body { padding: 8px 14px 12px; }
.unit-body ol { margin: 0; padding-left: 0; list-style: none; }
.unit-body li { padding: 3px 0; }
.pill { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; margin-right: 6px; }

/* Wizard */
.steps { display: flex; gap: 8px; margin-bottom: 16px; }
.steps div { flex: 1; padding: 8px 12px; border-radius: 8px; background: #eaecf0; color: var(--muted); font-weight: 600; font-size: 13px; }
.steps div.on { background: var(--brand); color: #fff; }
.drop { border: 2px dashed #b9c2d0; border-radius: 12px; padding: 28px; text-align: center; background: #fbfcfe; cursor: pointer; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cal .dow { background: #fafbfc; padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.cal .day { background: #fff; min-height: 104px; padding: 6px; font-size: 12px; }
.cal .day.other { background: #fafbfc; color: #98a2b3; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal .day.holiday { background: #fff7ec; }
.cal .ev { display: block; margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: var(--brand-soft); color: #173f7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.done { background: var(--ok-soft); color: var(--ok); }
.cal .ev.late { background: var(--bad-soft); color: var(--bad); }

/* Quiz (student) */
.q { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: #fff; }
.q .opt { display: block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; margin-top: 6px; cursor: pointer; font-weight: 500; }
.q .opt.right { background: var(--ok-soft); border-color: var(--ok); }
.q .opt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.stars button { font-size: 26px; border: 0; background: none; cursor: pointer; color: #d0d5dd; }
.stars button.on { color: #f5a524; }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(135deg, #14213d, #1f5fbf); }
.auth .card { width: min(420px, 100%); padding: 28px; }
.auth .logo { text-align: center; margin-bottom: 12px; }
.auth .logo img { height: 72px; }

/* Share (student) page */
.share { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.share aside { background: #fff; border-right: 1px solid var(--line); padding: 16px; overflow-y: auto; max-height: 100vh; position: sticky; top: 0; }
.share aside a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; }
.share aside a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.share main { padding: 24px; max-width: 900px; }

/* Progress overlay */
.progress-box { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 14px 18px; width: min(520px, 94vw); z-index: 60; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid #cfd4dc; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; width: 240px; z-index: 40; transition: left .2s; }
  .sidebar.open { left: 0; }
  .btn.menu-toggle { display: inline-flex; }
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .share { grid-template-columns: 1fr; }
  .share aside { position: static; max-height: none; }
}

/* ---------------- Print view (institute format, A4) ---------------- */
.print-root { background: #e9ebef; padding: 20px 0; }
.print-toolbar { max-width: 210mm; margin: 0 auto 12px; display: flex; gap: 8px; align-items: center; }
.sheet { width: 210mm; min-height: 297mm; margin: 0 auto 16px; background: #fff; padding: 12mm 13mm; box-shadow: 0 2px 10px rgba(0,0,0,.15); font-family: "Times New Roman", Times, serif; font-size: 11pt; color: #000; }
.sheet .hdr { display: grid; grid-template-columns: 26mm 1fr 26mm; align-items: center; }
.sheet .hdr img { width: 24mm; height: auto; }
.sheet .hdr .t { text-align: center; font-weight: 700; font-size: 14pt; line-height: 1.35; }
.sheet .dates { text-align: center; font-weight: 700; font-size: 12pt; margin: 6px 0 12px; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet td, .sheet th { border: 1px solid #000; padding: 5px 7px; vertical-align: top; text-align: justify; }
.sheet .l { font-weight: 700; width: 27%; }
.sheet .c2 { width: 15.5%; text-align: center; vertical-align: middle; font-weight: 700; }
.sheet .tm { text-align: center; vertical-align: middle; font-weight: 700; }
.sheet .content-html p { margin: 0 0 4px; }
.sheet figure { margin: 8px 0; text-align: center; }
.sheet figure img { max-width: 92%; max-height: 75mm; }
.sheet figcaption { font-style: italic; font-size: 9pt; }
.sheet .p2 td { height: 30mm; }
.sheet .sign { display: flex; justify-content: space-between; font-weight: 700; font-size: 12pt; margin-top: 22mm; }
.sheet .logo2 { width: 24mm; margin-bottom: 6px; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .no-print, .sidebar, .topbar, #toasts { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  .print-root { background: #fff; padding: 0; }
  .sheet { box-shadow: none; margin: 0; page-break-after: always; break-after: page; }
}

/* Master data & access */
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 4px 2px 10px; margin: 2px 4px 2px 0; font: inherit; font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.pick-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.pick-list label { padding: 3px 0; font-weight: 500; }
tr.muted td { color: #98a2b3; }

/* Filter panel */
.filters { padding: 14px 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; }
.filter-grid label { font-weight: 600; color: var(--muted); }
.filter-grid select, .filter-grid input { margin-top: 3px; }

/* ================= Mobile & tablet ================= */
.btn.ftoggle { display: none; }
.course-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .course-grid { grid-template-columns: 1fr; }
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 12px; }
  .kpi .num { font-size: 22px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar .user .small { display: none; }
  .topbar .search { max-width: none; }
  .page-head { margin-bottom: 12px; }
  .page-head h1 { font-size: 19px; }
  .card { padding: 14px; }
  .modal-back { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 14px 14px 0 0; }
  .modal .body { padding: 14px; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 39; }
}
@media (max-width: 640px) {
  /* inputs of 16px stop iPhones zooming in on focus */
  input, select, textarea { font-size: 16px; }
  .content { padding: 12px; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .tabs button { padding: 10px 10px; }

  /* Filters fold behind a button */
  .btn.ftoggle { display: inline-flex; }
  .filters .filter-grid { display: none; margin-top: 10px; }
  .filters.open .filter-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .filters .row { margin-top: 0 !important; }
  .filters.open .row { margin-top: 10px !important; }

  /* Data tables become labelled cards */
  .table-wrap { overflow: visible; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: #fff; }
  table.data tr:hover td { background: none; }
  table.data td { border: 0; padding: 4px 0; display: flex; gap: 10px; align-items: flex-start; }
  table.data td[data-label]::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding-top: 2px; }
  table.data td > * { min-width: 0; }
  table.data td:empty { display: none; }
  table.data td[colspan] { background: var(--brand-soft); border-radius: 6px; padding: 6px 8px; }
  table.data tr:has(td[colspan]) { border: 0; padding: 0; margin: 14px 0 6px; background: none; }
  table.data td.num { white-space: normal; }
  table.data select { width: 100%; }
  .card > .table-wrap, .card > table.data { margin: 0; }
  .card[style*="padding:0"] { background: none; border: 0; box-shadow: none; }

  /* Lesson editor stacks */
  .lp-table, .lp-table tbody, .lp-table tr, .lp-table td, .lp-table th, .lp-table colgroup { display: block; width: 100% !important; }
  .lp-table tr { border-bottom: 1px solid #98a2b3; }
  .lp-table td, .lp-table th { border: 0; padding: 6px 10px; }
  .lp-table tr:has(th) { display: none; }
  .lp-table .lbl { background: #f2f4f7; padding-bottom: 4px; }

  .img-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .img-card img { height: 110px; }
  .cal .day { min-height: 70px; padding: 3px; font-size: 11px; }
  .cal .ev { font-size: 10px; padding: 1px 3px; }
  .unit-head label { width: 100% !important; }
  .steps div { font-size: 12px; padding: 6px 8px; }
  .drop { padding: 18px; }
  .chip { font-size: 12px; }

  /* Student link: lesson list in a short scrolling box */
  .share aside { max-height: 38vh; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .share main { padding: 14px; }

  /* Print view fits the screen; printing still uses A4 below */
  .print-root { padding: 8px 0; }
  .print-toolbar { padding: 0 8px; flex-wrap: wrap; }
  .sheet { width: 100%; min-height: 0; padding: 14px 10px; font-size: 10.5pt; }
  .sheet .hdr { grid-template-columns: 56px 1fr 0; }
  .sheet .hdr img { width: 52px; }
  .sheet .hdr .t { font-size: 12pt; }
  .sheet .dates { font-size: 10pt; }
  .sheet .l { width: 34%; }
  .sheet td, .sheet th { padding: 4px 5px; word-break: break-word; }
}
@media print {
  .sheet { width: 210mm !important; min-height: 297mm !important; padding: 12mm 13mm !important; font-size: 11pt !important; }
}
/* overflow guards */
select, input, textarea { min-width: 0; max-width: 100%; }
.alert a, .share main a, td a { overflow-wrap: anywhere; }
.chip { flex-wrap: wrap; max-width: 100%; }
.tabs { max-width: 100%; }
.main, .content, .card, .filters { min-width: 0; }
@media (max-width: 640px) {
  .filters.open .filter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tabs { scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 640px) {
  table.data td { overflow-wrap: anywhere; word-break: break-word; }
  table.data td > div, table.data td > span { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 640px) {
  table.data td[data-label] { display: grid; grid-template-columns: 38% minmax(0, 1fr); column-gap: 10px; }
  table.data td[data-label]::before { grid-column: 1; grid-row: 1 / span 9; max-width: none; }
  table.data td[data-label] > * { grid-column: 2; }
}
@media (max-width: 640px) { table.data td[data-label] { row-gap: 2px; } table.data td[data-label]::before { grid-row: 1 / span 4; } }
