/* bibiep — speels maar proper */
@import url('/vendor/fonts/fredoka/500.css');
@import url('/vendor/fonts/fredoka/600.css');
@import url('/vendor/fonts/fredoka/700.css');
@import url('/vendor/fonts/nunito/400.css');
@import url('/vendor/fonts/nunito/600.css');
@import url('/vendor/fonts/nunito/800.css');

:root {
  /* kleuren uit het bibiep-logo */
  --bg: #f2f9ff;
  --card: #ffffff;
  --ink: #001c5c;
  --muted: #5f6f93;
  --line: #dcebf8;
  --soft: #eaf5ff;
  --orange: #fd6901;
  --orange-d: #d85700;
  --orange-l: #ffe6d3;
  --sun: #feba03;
  --sun-l: #fff2c4;
  --blue: #007cca;
  --blue-d: #00629f;
  --blue-l: #d9eefc;
  --sky: #45b5fa;
  --sky-l: #e0f3fe;
  --green: #3a9f2e;
  --green-l: #e3f5d6;
  --plum: #8b3dbe;
  --plum-l: #f0e3fa;
  --danger: #e0262f;
  --danger-l: #fde2e3;
  --ok: #2c9a3a;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(0, 28, 92, .04), 0 8px 24px rgba(0, 28, 92, .07);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; color: var(--ink); margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
a { color: var(--blue); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.show-sm { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 24px;
  background: rgba(242, 249, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none !important; }
.brand img { height: 60px; margin: -4px 0; width: auto; display: block; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--ink); padding: 8px 14px; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: background .15s;
}
.nav a:hover { background: var(--soft); }
.nav a.active { background: var(--ink); color: #fff; }
.nav a.lend { background: var(--orange); color: #fff; }
.nav a.lend:hover { background: var(--orange-d); }
.usermenu { position: relative; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--sun); color: var(--ink); font: 600 15px var(--display);
}
.dropdown {
  position: absolute; right: 0; top: 46px; min-width: 220px; background: #fff; border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 28, 92, .16); padding: 8px; display: none;
}
.dropdown.open { display: block; }
.dropdown .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--ink);
  background: none; border: 0; font: 700 14px var(--font); cursor: pointer; text-decoration: none;
}
.dropdown a:hover, .dropdown button:hover { background: var(--soft); }

/* Bottom tab bar (mobiel) */
.tabbar { display: none; }

main.page { max-width: 1240px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.page-head .emoji { font-size: 26px; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  font: 800 14px var(--font); color: var(--ink); background: var(--soft); text-decoration: none !important;
  transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: #d9eefc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-d); }
.btn-primary:hover { background: var(--orange-d); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-d); }
.btn-blue:hover { background: var(--blue-d); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-danger { background: var(--danger-l); color: var(--danger); }
.btn-danger:hover { background: #ffd0d2; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: inline-grid; place-items: center; font-size: 16px; color: var(--muted);
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; background: var(--soft); color: var(--ink); white-space: nowrap;
}
.badge.ok { background: var(--green-l); color: #24701c; }
.badge.warn { background: var(--sun-l); color: #8a6100; }
.badge.late { background: var(--danger-l); color: var(--danger); }
.badge.blue { background: var(--blue-l); color: #00548a; }
.badge.sky { background: var(--sky-l); color: #2f5fc4; }
.badge.plum { background: var(--plum-l); color: #6b3fb0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--soft); padding: 1px 7px; border-radius: 6px; }

/* ----------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 800; font-size: 13px; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff;
  font: 15px var(--font); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-l); }
textarea { min-height: 80px; resize: vertical; }
select[multiple] { min-height: 130px; padding: 6px; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check input { display: none; }
.chip-check span {
  display: inline-block; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); cursor: pointer;
  font-weight: 700; font-size: 13px; user-select: none; background: #fff;
}
.chip-check input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------------------------------------------------------------- modals */
dialog.modal {
  border: 0; padding: 0; border-radius: 24px; width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  box-shadow: 0 30px 80px rgba(0, 28, 92, .3); color: var(--ink); background: #fff;
}
dialog.modal.wide { width: min(900px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(0, 28, 92, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .18s ease-out; display: flex; flex-direction: column; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 10px; }
.modal-head h2 { margin: 0; flex: 1; }
.modal-body { padding: 8px 22px 18px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: #f7fbff; border-radius: 0 0 24px 24px; }
.modal-foot .left { margin-right: auto; }
.form-error { background: var(--danger-l); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-weight: 700; margin-bottom: 12px; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: pop .2s ease-out; text-align: center;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }

/* ------------------------------------------------------------ datatables */
.dt-container {
  font-size: 14px;
  --dt-column-ordering_alpha: 0; --dt-row_alpha-stripe: 0.012; --dt-row_alpha-hover: 0.02;
  --dt-paging-button_border: 0; --dt-paging-button_border-current: 0; --dt-paging-button_border-hover: 0; --dt-paging-button_border-current-hover: 0;
  --dt-paging-button_background-current: var(--ink); --dt-paging-button_color-current: #fff;
  --dt-paging-button_background-current-hover: var(--ink); --dt-paging-button_color-current-hover: #fff;
  --dt-paging-button_background-hover: var(--soft); --dt-paging-button_color-hover: var(--ink);
}
.dt-container .dt-layout-row { margin: 0 0 12px !important; }
.dt-container .dt-search input, .dt-container .dt-length select {
  border: 2px solid var(--line) !important; border-radius: 999px !important; padding: 7px 14px !important; background: #fff !important; width: auto;
}
.dt-container .dt-search input { min-width: 240px; }
table.dataTable { border-collapse: separate !important; border-spacing: 0; width: 100% !important; }
table.dataTable thead th {
  font: 800 12px var(--font); text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border-bottom: 2px solid var(--line) !important; padding: 10px 12px !important; background: transparent;
}
table.dataTable tbody td { padding: 11px 12px !important; border-top: 1px solid var(--line) !important; vertical-align: middle; }
table.dataTable tbody tr:hover > * { background: #f5faff !important; box-shadow: none !important; }
table.dataTable.row-click tbody tr { cursor: pointer; }
table.dataTable td.actions { text-align: right; white-space: nowrap; width: 1%; }
.dt-container .dt-paging .dt-paging-button { border-radius: 999px !important; font-weight: 800; min-width: 36px; }
.dt-container .dt-info { color: var(--muted); }
div.dt-processing > div:last-child > div { background: var(--orange) !important; }
.av-sm { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 14px var(--display); flex: none; }
.book-cell { display: flex; align-items: center; gap: 10px; }
.cover { width: 34px; height: 46px; border-radius: 6px; object-fit: cover; background: var(--soft); flex: none; display: grid; place-items: center; font-size: 18px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font: 800 13px var(--font); cursor: pointer; color: var(--ink); }
.seg button.on { background: #fff; box-shadow: 0 2px 6px rgba(0, 28, 92, .1); }

/* ------------------------------------------------------- detail-weergaves */
.detail-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.detail-head .cover { width: 70px; height: 96px; font-size: 32px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-table th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.mini-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 26px; color: var(--muted); }
.empty .big { font-size: 40px; display: block; margin-bottom: 6px; }

/* --------------------------------------------------------------- dashboard */
.widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.widget { min-width: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; position: relative; min-height: 130px; display: flex; flex-direction: column; }
.widget.size-2 { grid-column: span 2; }
.widget.size-3 { grid-column: span 3; }
.widget-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.widget-head h3 { margin: 0; flex: 1; font-size: 15px; }
.widget-head .tools { opacity: 0; transition: opacity .15s; display: flex; }
.widget:hover .tools, .widget:focus-within .tools { opacity: 1; }
.widget .chart-wrap { position: relative; flex: 1; min-height: 220px; }
.widget .number { font: 600 48px/1 var(--display); margin-top: auto; }
.widget .number-sub { color: var(--muted); font-size: 13px; font-weight: 700; }
.widget.tone-orange { background: var(--orange); color: #fff; }
.widget[class*=tone-]:not(.tone-sun) h3 { color: #fff; } .widget.tone-orange .number-sub, .widget.tone-orange .icon-btn { color: rgba(255,255,255,.85); }
.widget.tone-blue { background: var(--blue); color: #fff; } .widget.tone-blue .number-sub, .widget.tone-blue .icon-btn { color: rgba(255,255,255,.85); }
.widget.tone-sun { background: var(--sun); }
.widget.tone-green { background: var(--green); color: #fff; } .widget.tone-green .number-sub, .widget.tone-green .icon-btn { color: rgba(255,255,255,.85); }
.widget.tone-sky { background: var(--sky); color: #fff; } .widget.tone-sky .number-sub, .widget.tone-sky .icon-btn { color: rgba(255,255,255,.85); }
.widget.tone-plum { background: var(--plum); color: #fff; } .widget.tone-plum .number-sub, .widget.tone-plum .icon-btn { color: rgba(255,255,255,.85); }
.widget .icon-btn:hover { background: rgba(255,255,255,.25); }
.widget .deco { position: absolute; right: 14px; bottom: 8px; font-size: 44px; opacity: .25; pointer-events: none; }
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); counter-increment: r; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li::before {
  content: counter(r); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--soft); font: 600 13px var(--display);
}
.rank-list li:nth-child(1)::before { background: var(--sun); }
.rank-list li:nth-child(2)::before { background: #e6e8ef; }
.rank-list li:nth-child(3)::before { background: #f6d2b8; }
.rank-list .lbl { flex: 1; min-width: 0; }
.rank-list .lbl div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.rank-list .lbl small { color: var(--muted); }
.rank-list .val { font: 600 16px var(--display); }
.add-widget {
  border: 3px dashed #bfe3fb; border-radius: var(--radius); display: grid; place-items: center; min-height: 130px;
  background: transparent; cursor: pointer; font: 800 15px var(--font); color: var(--muted); transition: all .15s;
}
.add-widget:hover { border-color: var(--orange); color: var(--orange); background: #fff; }

/* Widget-builder */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pick { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; background: #fff; text-align: left; font: 700 13.5px var(--font); color: var(--ink); display: flex; gap: 8px; align-items: center; }
.pick:hover { border-color: #9fd4f9; }
.pick.on { border-color: var(--orange); background: var(--orange-l); }
.pick .ic { font-size: 20px; }
.step-title { font: 600 15px var(--display); margin: 16px 0 8px; display: flex; gap: 8px; align-items: center; }
.step-title .n { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; }
.color-dots { display: flex; gap: 8px; }
.color-dots label input { display: none; }
.color-dots label span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.color-dots label input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.preview-box { background: var(--bg); border-radius: 16px; padding: 14px; margin-top: 10px; }

/* ----------------------------------------------------------- uitlenen (mobiel) */
.lend-wrap { max-width: 720px; margin: 0 auto; }
.lend-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 999px; padding: 5px; box-shadow: var(--shadow); margin-bottom: 18px; }
.lend-tabs button { border: 0; background: none; padding: 12px; border-radius: 999px; font: 600 16px var(--display); cursor: pointer; color: var(--muted); }
.lend-tabs button.on { background: var(--orange); color: #fff; }
.lend-tabs button.on.return { background: var(--blue); }
.crumbs { display: flex; gap: 6px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs button { border: 0; background: #fff; padding: 7px 14px; border-radius: 999px; font: 800 14px var(--font); cursor: pointer; box-shadow: var(--shadow); color: var(--ink); }
.crumbs .sep { color: var(--muted); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile {
  background: #fff; border: 0; border-radius: 20px; padding: 18px 12px; cursor: pointer; box-shadow: var(--shadow);
  font: 600 22px var(--display); color: var(--ink); transition: transform .1s; text-align: center; position: relative;
}
.tile:active { transform: scale(.97); }
.tile small { display: block; font: 700 12px var(--font); color: var(--muted); margin-top: 2px; }
.tile.student { font-size: 16px; padding: 14px 10px; text-align: left; display: flex; align-items: center; gap: 10px; }
.tile.student .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 600 16px var(--display); flex: none; }
.tile.student .nm { flex: 1; min-width: 0; line-height: 1.2; }
.tile.student .nm span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .dots { display: flex; gap: 3px; margin-top: 4px; }
.tile .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tile .dots i.on { background: var(--blue); }
.tile .dots i.late { background: var(--danger); }
.who-card { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.who-card .av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 600 22px var(--display); }
.scan-zone { background: #fff; border-radius: 24px; padding: 16px; box-shadow: var(--shadow); }
.scan-video { width: 100%; border-radius: 16px; overflow: hidden; background: #111; aspect-ratio: 4/3; position: relative; }
.scan-video video { object-fit: cover; }
.scan-video .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; }
.scan-video.idle { background: linear-gradient(135deg, #001c5c, #0a3a8c); }
.scan-flash { animation: flash .4s; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(47, 163, 107, .8); } 100% { box-shadow: 0 0 0 30px rgba(47, 163, 107, 0); } }
.loan-list { display: grid; gap: 8px; margin-top: 14px; }
.loan-item { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 16px; padding: 10px 12px; }
.loan-item .t { flex: 1; min-width: 0; }
.loan-item .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-banner { border-radius: 18px; padding: 14px 16px; font-weight: 800; margin-top: 12px; display: flex; gap: 10px; align-items: center; }
.result-banner.ok { background: var(--green-l); color: #24701c; }
.result-banner.err { background: var(--danger-l); color: var(--danger); }
.result-banner.info { background: var(--sun-l); color: #6f4f00; }
.result-banner .big { font-size: 26px; }
.return-feed { display: grid; gap: 8px; margin-top: 14px; }

/* ----------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 15% 20%, #ffe6d3 0, transparent 35%), radial-gradient(circle at 85% 80%, #d9eefc 0, transparent 35%), var(--bg); }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 28px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 28, 92, .12); text-align: center; }
.login-card img { width: 230px; max-width: 80%; margin: -6px auto 0; display: block; }
.login-card h1 { font-size: 38px; margin: 4px 0 2px; letter-spacing: -1px; }
.login-card h1 b { color: var(--orange); font-weight: 600; }
.login-card form { text-align: left; display: grid; gap: 14px; margin-top: 22px; }

/* ----------------------------------------------------------- import wizard */
.drop {
  display: block;
  border: 3px dashed #bfe3fb; border-radius: 20px; padding: 30px; text-align: center; cursor: pointer; background: #f7fbff;
}
.drop.over { border-color: var(--blue); background: var(--blue-l); }
.drop .big { font-size: 42px; }
.map-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }

/* ---------------------------------------------------------------- labels */
.labels-sheet { display: grid; grid-template-columns: repeat(3, 70mm); grid-auto-rows: 37mm; gap: 0; background: #fff; width: 210mm; margin: 0 auto; padding: 4mm 0; }
.label { padding: 3mm 4mm; display: flex; gap: 3mm; align-items: center; overflow: hidden; border: 1px dashed #eee; }
.label img.qr { width: 27mm; height: 27mm; flex: none; }
.label .info { min-width: 0; font-size: 9pt; line-height: 1.25; }
.label .info b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.label .info .c { font-family: ui-monospace, monospace; font-size: 10pt; font-weight: 700; margin-top: 2mm; }
.label .info .brandline { font: 600 8pt var(--display); color: var(--orange); }
@media print {
  .topbar, .tabbar, .no-print, .toasts { display: none !important; }
  body { background: #fff; }
  main.page { padding: 0; max-width: none; }
  .label { border: 0; }
  @page { size: A4; margin: 0; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget.size-3 { grid-column: span 2; }
}
@media (max-width: 800px) {
  body { padding-bottom: 84px; }
  .topbar { padding: 6px 14px; }
  .brand img { height: 44px; }
  .show-sm { display: block !important; }
  .topbar .nav { display: none; }
  .topbar .brand { flex: 1; }
  main.page { padding: 16px 14px; }
  h1 { font-size: 24px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0, 28, 92, .06);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font: 800 11px var(--font);
    text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer;
  }
  .tabbar .ic { font-size: 21px; line-height: 1.1; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.center .ic {
    width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; background: var(--orange); color: #fff;
    display: grid; place-items: center; font-size: 26px; box-shadow: 0 6px 16px rgba(253, 105, 1, .45); border: 4px solid #fff;
  }
  .form-grid { grid-template-columns: 1fr; }
  .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .widget { padding: 14px; }
  .widget-head h3 { font-size: 14px; }
  .widget .deco { font-size: 34px; }
  .widget.size-2, .widget.size-3 { grid-column: 1 / -1; }
  .widget .number { font-size: 38px; }
  .widget-head .tools { opacity: 1; }
  .widget-head .tools [data-act=left], .widget-head .tools [data-act=right], .widget-head .tools [data-act=del] { display: none; }
  .widget-head .tools .icon-btn { width: 28px; height: 28px; font-size: 13px; }
  .dt-container .dt-search input { min-width: 0; width: 100%; }
  .dt-container .dt-layout-row:first-child .dt-layout-cell { width: 100%; }
  table.dataTable .hide-sm { display: none; }
  .map-grid { grid-template-columns: 1fr 1fr; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick { font-size: 12.5px; padding: 8px 10px; }
  dialog.modal { border-radius: 24px 24px 0 0; margin: auto 0 0; width: 100vw; max-width: 100vw; max-height: 92vh; }
  .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .toasts { bottom: 96px; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .tile-grid.students { grid-template-columns: 1fr 1fr; }
}
.sheet-menu { display: grid; gap: 6px; }
.sheet-menu a { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--bg); color: var(--ink); font-weight: 800; text-decoration: none; }
.sheet-menu a .ic { font-size: 22px; }
