/* DSM Portal — mirrors the Digital School Manager desktop app's theme
   (lib/main.dart ThemeData, lib/navigation/sidebar_navigation.dart,
   lib/screens/home_screen.dart, lib/screens/parent_portal/*). */

:root {
  --primary: #3B82F6;          /* AppBar / seed colour */
  --primary-dark: #1D4ED8;
  --swatch: #2196F3;           /* Colors.blue — buttons, login gradient */
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --bg: #F8F9FF;               /* M3 surface seeded from #3B82F6 */
  --card: #FFFFFF;
  --text: #1C1B1F;
  --grey-500: #9E9E9E;
  --grey-600: #757575;
  --grey-700: #616161;
  --grey-300: #E0E0E0;
  --divider: #E0E0E0;
  --red: #F44336;
  --green: #4CAF50;
  --green-700: #388E3C;
  --teal: #009688;
  --teal-50: #E0F2F1;
  --purple-50: #F3E5F5;
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .18), 0 1px 4px rgba(0, 0, 0, .10);
  --shadow-3: 0 2px 4px rgba(0, 0, 0, .16), 0 4px 10px rgba(0, 0, 0, .10);
  --font: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* Material colours used by the app's menu items and tiles. Each sets --c. */
.c-blue { --c: #2196F3; }
.c-indigo { --c: #3F51B5; }
.c-green { --c: #4CAF50; }
.c-green7 { --c: #388E3C; }
.c-teal { --c: #009688; }
.c-deeppurple { --c: #673AB7; }
.c-purple { --c: #9C27B0; }
.c-cyan { --c: #0097A7; }
.c-deeporange { --c: #FF5722; }
.c-orange { --c: #FF9800; }
.c-red { --c: #F44336; }
.c-bluegrey { --c: #607D8B; }
.c-brown { --c: #795548; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--primary); }
h2, h3 { margin: 0; }
p { margin: 0 0 8px; }

.mi {
  font-family: 'Material Icons Outlined';
  font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap;
  direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga';
  vertical-align: middle; user-select: none;
}

/* ===================================================================== login */
body.auth {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--swatch) 0%, rgba(33, 150, 243, .7) 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.auth-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; }
.auth-logo {
  width: 128px; height: 128px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: 0 0 20px 5px rgba(0, 0, 0, .1); overflow: hidden;
}
.auth-logo .mi { font-size: 80px; color: var(--swatch); }
.auth-logo img { width: 96px; height: 96px; object-fit: contain; }
.auth-title { margin: 32px 0 8px; font-size: 28px; font-weight: 700; color: #fff; text-align: center; line-height: 1.2; }
.auth-sub { margin: 0 0 40px; font-size: 16px; color: rgba(255, 255, 255, .7); text-align: center; }
.auth-card { width: 100%; background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12); }
.auth-card h2 { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 20px; }
.auth-head { display: flex; align-items: center; margin-bottom: 24px; }
.auth-head h2 { flex: 1; margin: 0 48px 0 0; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--text); text-decoration: none; border: 0; background: transparent; cursor: pointer; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }

.category { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; border-radius: 12px; text-decoration: none; color: var(--text);
  border: 1px solid rgba(33, 150, 243, .2); background: rgba(33, 150, 243, .06); }
.category:hover { background: rgba(33, 150, 243, .12); }
.category .cat-icon { padding: 10px; border-radius: 10px; background: var(--swatch); color: #fff; display: grid; place-items: center; }
.category .cat-text { flex: 1; display: flex; flex-direction: column; }
.category strong { font-size: 15px; }
.category small { font-size: 12px; color: var(--grey-600); }
.category > .mi:last-child { color: var(--swatch); }
.category.disabled { opacity: .55; pointer-events: none; }
.auth-divider { border: 0; border-top: 1px solid var(--divider); margin: 12px 0; }

.field { position: relative; margin-bottom: 16px; }
.field .mi.lead { position: absolute; left: 12px; top: 16px; color: var(--grey-700); pointer-events: none; }
.field input {
  width: 100%; height: 56px; padding: 20px 48px 6px 48px; font: inherit; font-size: 16px; color: var(--text);
  border: 1px solid #79747E; border-radius: 12px; background: #FAFAFA; outline: none;
}
.field input:focus { border: 2px solid var(--swatch); padding-left: 47px; }
.field label { position: absolute; left: 48px; top: 7px; font-size: 12px; color: var(--grey-700); pointer-events: none; }
.field input:focus + label { color: var(--swatch); }
.field .trail { position: absolute; right: 4px; top: 4px; color: var(--grey-700); }
.field-hint { margin: -10px 0 14px 14px; font-size: 12px; color: var(--grey-600); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border: 0; border-radius: 20px; font: inherit; font-weight: 600; font-size: 14px;
  background: var(--swatch); color: #fff; cursor: pointer; text-decoration: none; box-shadow: var(--shadow-2);
}
.btn:hover { filter: brightness(1.06); }
.btn-login { width: 100%; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 700; }

.auth-error { display: flex; gap: 10px; align-items: flex-start; background: #FFEBEE; color: #C62828; border-radius: 10px; padding: 12px; margin-bottom: 16px; font-size: 13px; }
.auth-foot { margin-top: 32px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .15); color: #fff; text-align: center; font-size: 12px; }
.auth-foot strong { display: block; font-size: 13px; }

/* ===================================================================== shell */
body.shell { display: flex; min-height: 100vh; }
.drawer-toggle { position: absolute; opacity: 0; pointer-events: none; }

.sidebar {
  width: 280px; flex: none; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
  box-shadow: 2px 0 10px rgba(0, 0, 0, .3); z-index: 30;
}
.sb-header { display: flex; align-items: center; gap: 8px; padding: 16px 12px 16px 16px; min-height: 76px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.sb-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.sb-logo { width: 40px; height: 40px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; overflow: hidden; }
.sb-logo img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
.sb-title { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-close { display: none; padding: 4px; border-radius: 6px; background: rgba(255, 255, 255, .2); cursor: pointer; }
.sb-close .mi { font-size: 20px; }
.sb-term { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--slate-900);
  border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 11px; font-weight: 600; letter-spacing: .2px; color: #93C5FD; }
.sb-term .mi { font-size: 13px; color: #60A5FA; }
.sb-menu { flex: 1; overflow-y: auto; padding: 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(59, 130, 246, .7) transparent; }
.sb-item {
  display: flex; align-items: center; gap: 12px; margin: 2px 0; padding: 12px 14px; border-radius: 10px;
  color: #E0E0E0; text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .3px; border: 1.5px solid transparent;
}
.sb-item:hover { background: rgba(255, 255, 255, .08); }
.sb-icon { padding: 6px; border-radius: 8px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; flex: none; }
.sb-icon .mi { font-size: 20px; color: #BDBDBD; }
.sb-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item.selected { background: color-mix(in srgb, var(--c) 20%, transparent); border-color: color-mix(in srgb, var(--c) 50%, transparent); color: #fff; font-weight: 600; }
.sb-item.selected .sb-icon { background: color-mix(in srgb, var(--c) 30%, transparent); }
.sb-item.selected .sb-icon .mi { color: var(--c); filter: brightness(1.35); }
.sb-sub { padding-left: 30px; }
.sb-group { margin: 14px 4px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #94A3B8; }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .15); }
.sb-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #EF9A9A; background: rgba(244, 67, 54, .25); }
.sb-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-user-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { font-size: 12px; color: #EF5350; }
.sb-logout { margin: 0; }
.sb-logout button { border: 0; background: transparent; color: #9E9E9E; cursor: pointer; padding: 6px; border-radius: 8px; }
.sb-logout button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.scrim { display: none; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.appbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 4px 0 8px; background: var(--primary); color: #fff; }
.appbar-title { flex: 1; min-width: 0; margin: 0 8px; font-size: 20px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; text-decoration: none; border: 0; background: transparent; cursor: pointer; flex: none; }
.appbar-btn:hover { background: rgba(255, 255, 255, .15); }
.appbar-form { margin: 0; }
.menu-btn { display: none; }

.body-row { flex: 1; display: flex; min-height: 0; }
.content { flex: 1; min-width: 0; padding: 20px; max-width: 1200px; }
.records-asof { margin: 24px 0 0; font-size: 12px; color: var(--grey-600); }
.records-asof .mi { font-size: 16px; color: var(--green); }

/* RoleDetailsPanel */
.role-panel { width: 260px; flex: none; padding: 20px; background: #fff; border-left: 1px solid var(--grey-300); display: flex; flex-direction: column; align-items: center; text-align: center; }
.rp-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--c) 15%, transparent); }
.rp-icon { display: grid; place-items: center; }
.rp-icon .mi { font-size: 48px; color: var(--c); }
.rp-name { margin-top: 16px; font-size: 16px; }
.rp-role { margin-top: 6px; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.role-panel hr { width: 100%; border: 0; border-top: 1px solid var(--divider); margin: 24px 0 8px; }
.rp-row { width: 100%; text-align: left; margin-bottom: 16px; }
.rp-row small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--grey-500); text-transform: uppercase; margin-bottom: 4px; }

/* ===================================================================== components */
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-2); margin-bottom: 12px; }
.card-pad { padding: 16px; }
.card-title { font-size: 15px; font-weight: 700; }
.card hr, .divider { border: 0; border-top: 1px solid var(--divider); margin: 8px 0; }
.card-teal { background: var(--teal-50); }
.card-purple { background: var(--purple-50); }
.section-title { font-size: 15px; font-weight: 700; margin: 16px 0 8px; }
.muted { color: var(--grey-600); }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.red { color: var(--red); }
.green { color: var(--green); }

/* Welcome / header rows (Card + Row of avatar + text) */
.hero { display: flex; align-items: center; gap: 16px; padding: 16px; }
.hero-text { flex: 1; min-width: 0; }
.hero-text strong { display: block; font-size: 16px; }
.hero-text span { color: var(--grey-700); font-size: 13px; }
.hero-right { text-align: right; }
.hero-right small { display: block; font-size: 11px; color: var(--grey-600); }
.hero-right b { font-size: 16px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 600; }
.avatar-48 { width: 48px; height: 48px; }
.avatar-64 { width: 64px; height: 64px; }
.avatar-96 { width: 96px; height: 96px; }

/* ListTile */
.tile { display: flex; align-items: center; gap: 16px; padding: 12px 16px; min-height: 64px; text-decoration: none; color: var(--text); border-radius: 16px; }
a.tile:hover { background: rgba(0, 0, 0, .04); }
.tile-lead { flex: none; display: grid; place-items: center; }
.tile-lead .mi { color: var(--c, var(--grey-700)); }
.tile-text { flex: 1; min-width: 0; }
.tile-title { display: block; font-size: 16px; font-weight: 600; }
.tile-sub { display: block; font-size: 14px; color: var(--grey-700); }
.tile-trail { flex: none; display: flex; align-items: center; gap: 8px; text-align: right; }
.tile-trail small { display: block; font-size: 11px; color: var(--grey-600); }
.check-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }

/* ParentPortalTile grid */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.ptile { aspect-ratio: 1.3; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 8px; text-decoration: none; color: var(--text); text-align: center; font-weight: 600; }
.ptile:hover { box-shadow: var(--shadow-3); background: color-mix(in srgb, var(--c) 4%, #fff); }
.ptile .mi { font-size: 36px; color: var(--c); }

/* Home screen: quick access bar + menu cards */
.quick-bar { display: flex; background: var(--card); box-shadow: 0 2px 4px rgba(0, 0, 0, .2); margin: -20px -20px 20px; }
.quick-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; text-decoration: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); border-bottom: 3px solid var(--c); font-size: 12px; font-weight: 600; }
.quick-item:hover { background: color-mix(in srgb, var(--c) 18%, #fff); }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.menu-card { border-radius: 16px; box-shadow: var(--shadow-3); text-decoration: none; color: var(--text); padding: 28px 16px; min-height: 230px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), color-mix(in srgb, var(--c) 5%, #fff)); }
.menu-card:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .16); }
.menu-card .circle { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, #fff); margin-bottom: 18px; }
.menu-card .circle .mi { font-size: 38px; color: var(--c); }
.menu-card strong { font-size: 17px; }
.menu-card span { margin-top: 4px; font-size: 13px; color: var(--grey-700); }

/* Stat cards (dashboard) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; box-shadow: var(--shadow-2);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), color-mix(in srgb, var(--c) 5%, #fff)); }
.stat .circle { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, #fff); }
.stat .circle .mi { color: var(--c); }
.stat small { display: block; font-size: 12px; color: var(--grey-700); }
.stat b { display: block; font-size: 20px; }
.stat em { font-style: normal; font-size: 12px; color: var(--grey-600); }

/* Bills lines */
.line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.line.bold { font-weight: 700; }
.line.red { color: var(--red); }
.line.green { color: var(--green); }

/* Details rows (Student Details) */
.drow { display: flex; padding: 6px 0; }
.drow > span:first-child { width: 150px; flex: none; color: var(--grey-700); }
.drow > span:last-child { font-weight: 500; }
.section-teal { color: var(--teal); font-size: 15px; font-weight: 700; }

/* Pickers (outlined dropdowns) */
.picker { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.field-outlined { position: relative; flex: 1 1 150px; }
.field-outlined > span { position: absolute; left: 10px; top: -8px; padding: 0 4px; font-size: 12px; color: var(--grey-700); background: var(--bg); }
.field-outlined select, .field-outlined input {
  width: 100%; height: 48px; padding: 8px 12px; font: inherit; font-size: 15px; color: var(--text);
  border: 1px solid #79747E; border-radius: 4px; background: transparent;
}
.field-outlined select:focus, .field-outlined input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.check { display: flex; align-items: center; gap: 6px; color: var(--grey-700); font-size: 13px; }

/* DataTable */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt th { height: 56px; padding: 0 12px; text-align: left; font-weight: 700; color: var(--text); white-space: nowrap; border-bottom: 1px solid var(--divider); background: #F5F7FB; }
.dt td { height: 48px; padding: 6px 12px; border-bottom: 1px solid var(--divider); }
.dt tbody tr:hover { background: rgba(59, 130, 246, .05); }
.dt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dt tfoot td { font-weight: 700; border-bottom: 0; }
.dt a { color: var(--text); font-weight: 600; text-decoration: none; }
.dt a:hover { color: var(--primary); text-decoration: underline; }
.mini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 10px; }

.chip { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: capitalize;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.chip-present { --c: #388E3C; }
.chip-absent { --c: #E53935; }
.chip-late { --c: #EF6C00; }

.banner { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 16px; margin-bottom: 16px; box-shadow: var(--shadow-2); }
.banner .mi { flex: none; }
.banner-warn { background: #FFF3E0; color: #E65100; }
.banner-info { background: #E3F2FD; color: #0D47A1; }
.banner-error { background: #FFEBEE; color: #C62828; }
.empty { padding: 24px; text-align: center; color: var(--grey-700); }

progress.bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: #E3E8EF; overflow: hidden; }
progress.bar::-webkit-progress-bar { background: #E3E8EF; border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }

/* ===================================================================== responsive */
@media (min-width: 700px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .role-panel { display: none; } }
@media (max-width: 1000px) { .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phones / small tablets: sidebar becomes a slide-in drawer (like the app's
   mobile layout, which has no permanent sidebar). */
@media (max-width: 899px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .drawer-toggle:checked ~ .sidebar { box-shadow: 2px 0 10px rgba(0, 0, 0, .3); }
  .sb-close { display: grid; }
  .menu-btn { display: grid; }
  .drawer-toggle:checked ~ .sidebar { transform: none; }
  .drawer-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; }
  .appbar-title { font-size: 18px; }
}
@media (max-width: 600px) {
  .content { padding: 16px; }
  .quick-bar { margin: -16px -16px 16px; overflow-x: auto; }
  .quick-item { min-width: 76px; }
  .menu-grid { gap: 14px; }
  .menu-card { min-height: 0; padding: 22px 10px; }
  .menu-card .circle { width: 60px; height: 60px; margin-bottom: 12px; }
  .menu-card .circle .mi { font-size: 30px; }
  .menu-card strong { font-size: 15px; }
  .hero-right { display: none; }
  .tile-trail small, .tile-trail .amt { display: none; }
  .drow { flex-direction: column; }
  .drow > span:first-child { width: auto; font-size: 12px; }
  .tile-grid { gap: 12px; }
}
@media print {
  .sidebar, .appbar, .picker, .records-asof, .role-panel { display: none !important; }
  body.shell { display: block; background: #fff; }
  .card { box-shadow: none; border: 1px solid var(--divider); }
}

.center-col { text-align: center; margin-bottom: 16px; }
.center-block { margin: 0 auto; display: block; }
.center-name { margin: 12px 0 0; font-size: 18px; font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.toolbar .field-outlined { flex: 1 1 200px; }
.count-line { margin: 0 0 10px; font-size: 13px; color: var(--grey-700); }
.link-right { margin-left: auto; font-weight: 600; text-decoration: none; }
.menu-card strong, .menu-card span, .ptile span { overflow-wrap: anywhere; }
body.shell { overflow-x: hidden; }

/* ===================================================================== reports / staff / students */
.c-amber { --c: #FFA000; }
.sb-chev { margin-left: auto; font-size: 18px; color: #9E9E9E; }
.menu-card.disabled { opacity: .5; cursor: not-allowed; }

/* Right-hand Quick Access panel (QuickAccessSidebar, width 250) */
.quick-panel { width: 250px; flex: none; background: #fff; border-left: 1px solid var(--grey-300); display: flex; flex-direction: column; }
.qp-head { min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--grey-300); display: flex; flex-direction: column; justify-content: center; }
.qp-head strong { font-size: 17px; color: var(--grey-700); }
.qp-head small { font-size: 12px; color: var(--grey-600); }
.qp-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 56px; }
.qp-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.qp-tile .qp-item { background: color-mix(in srgb, var(--c) 8%, #fff); border: 1.5px solid transparent; }
.qp-tile .qp-item:hover { background: color-mix(in srgb, var(--c) 14%, #fff); }
.qp-tile .qp-item.current { background: color-mix(in srgb, var(--c) 18%, #fff); border-color: var(--c); font-weight: 700; }
.qp-tile .qp-icon { padding: 6px; border-radius: 8px; background: var(--c); display: grid; place-items: center; }
.qp-tile .qp-icon .mi { color: #fff; font-size: 20px; }
.qp-outlined .qp-item { color: var(--c); font-weight: 400; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); border-radius: 20px; padding: 10px 14px; }
.qp-outlined .qp-item:hover { background: color-mix(in srgb, var(--c) 6%, #fff); }
.qp-outlined .qp-item.current { border: 2px solid color-mix(in srgb, var(--c) 90%, transparent); background: color-mix(in srgb, var(--c) 8%, #fff); font-weight: 700; }
.qp-outlined .qp-icon .mi { font-size: 20px; }
.qp-item.disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 1100px) { .quick-panel { display: none; } }

/* Report cards (Card with tinted background, icon + bold title, rows) */
.report-card { padding: 18px; background: color-mix(in srgb, var(--c) 7%, #fff); }
.rc-head { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.rc-head .mi { color: var(--c); font-size: 28px; filter: brightness(.85); }
.rc-sub { margin: 4px 0 0; font-size: 13px; color: var(--grey-600); }
.report-card hr { margin: 12px 0; }
.rrow { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 15px; }
.rrow > span:first-child { font-weight: 500; }
.rrow.total { font-weight: 700; font-size: 16px; }
.rrow.total > span:last-child { font-size: 17px; }
.rrow .sub { display: block; font-size: 11px; color: var(--grey-600); font-weight: 400; }
.rrow.green > span:last-child { color: #2E7D32; }
.rrow.red > span:last-child { color: #C62828; }
.rc-label { margin: 8px 0 6px; font-size: 15px; font-weight: 600; color: var(--grey-700); }
.breakdown { background: #fff; border: 1px solid #90CAF9; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.breakdown-title { font-weight: 600; color: #1976D2; margin-bottom: 8px; }

.section-bar { display: flex; align-items: center; gap: 8px; padding: 12px; margin: 22px 0 10px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 17px; background: var(--c); }
.section-bar .mi { color: #fff; }
.section-bar.c-brown { background: linear-gradient(135deg, #5D4037, #8D6E63); }

/* Bordered report table (Flutter Table with TableBorder.all) */
table.bt { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.bt th, .bt td { border: 1px solid color-mix(in srgb, var(--c, #9E9E9E) 45%, #fff); padding: 6px 8px; text-align: left; vertical-align: top; }
.bt th { background: color-mix(in srgb, var(--c, #9E9E9E) 30%, #fff); font-weight: 700; }
.bt .num { text-align: right; white-space: nowrap; }
.bt .ctr { text-align: center; }

/* Pill tab bar (TabBar with filled indicator) */
.pill-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border-radius: 10px; background: #E8EAF6; border: 1px solid #9FA8DA; margin-bottom: 18px; scrollbar-width: none; }
.pill-tabs a { padding: 8px 14px; border-radius: 8px; white-space: nowrap; text-decoration: none; font-size: 12px; font-weight: 500; color: #303F9F; }
.pill-tabs a[aria-current] { background: #303F9F; color: #fff; font-weight: 700; }
/* Underline tab bar (AppBar bottom TabBar) */
.tabs { display: flex; overflow-x: auto; margin: -20px -20px 16px; background: var(--primary); scrollbar-width: none; }
.tabs a { flex: 1; min-width: max-content; text-align: center; padding: 14px 16px; color: rgba(255,255,255,.75); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: #fff; border-bottom-color: #fff; }
.subtabs { display: flex; border-bottom: 1px solid var(--divider); margin-bottom: 12px; }
.subtabs a { flex: 1; text-align: center; padding: 12px; text-decoration: none; color: var(--grey-600); font-weight: 600; border-bottom: 2px solid transparent; }
.subtabs a[aria-current] { color: var(--c, var(--primary)); border-bottom-color: var(--c, var(--primary)); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.chip-sel { padding: 8px 14px; border-radius: 20px; background: #F5F5F5; border: 1px solid #E0E0E0; color: var(--grey-700); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip-sel[aria-current] { background: var(--c, #388E3C); border-color: var(--c, #388E3C); color: #fff; }

/* Action buttons and date inputs */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.btn-row > * { flex: 1 1 160px; }
.btn-c { background: var(--c); border-radius: 6px; padding: 12px 16px; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--grey-300); box-shadow: none; }
.date-input { height: 46px; border: 1px solid #79747E; border-radius: 6px; padding: 0 10px; font: inherit; background: #fff; }

/* List tiles with numbered avatars */
.num-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--c); flex: none; }
.tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 10px; font-size: 11px; color: #388E3C; background: #E8F5E9; border: 1px solid #A5D6A7; }
.method-breakdown { border: 1px solid #A5D6A7; border-radius: 10px; background: #E8F5E9; margin-top: 12px; overflow: hidden; }
.method-breakdown .mb-head { background: #388E3C; color: #fff; padding: 10px 14px; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.method-breakdown .mb-body { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; padding: 14px; }
.mb-cell small { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--c); }
.mb-cell small .mi { font-size: 14px; }
.mb-cell b { font-size: 13px; }
.mb-total { margin-left: auto; text-align: right; }
.mb-total small { display: block; font-size: 11px; color: var(--grey-500); }
.mb-total b { font-size: 17px; color: #2E7D32; }

/* Expansion tile */
details.xp { background: #fff; border-radius: 16px; box-shadow: var(--shadow-2); margin-bottom: 12px; overflow: hidden; }
details.xp summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
details.xp summary::-webkit-details-marker { display: none; }
details.xp summary .xp-title { flex: 1; }
details.xp summary .xp-title strong { display: block; font-size: 16px; }
details.xp summary .xp-title small { color: var(--grey-600); }
details.xp summary::after { content: "expand_more"; font-family: "Material Icons Outlined"; font-size: 24px; color: var(--grey-600); transition: transform .15s; }
details.xp[open] summary::after { transform: rotate(180deg); }
.xp-body { padding: 0 16px 16px; }
.stat-trio { display: flex; justify-content: space-around; text-align: center; gap: 8px; flex-wrap: wrap; }
.stat-trio > div { min-width: 90px; }
.stat-trio .mi { color: var(--c); font-size: 28px; }
.stat-trio b { display: block; font-size: 20px; color: var(--c); }
.stat-trio small { font-size: 12px; color: var(--grey-700); }
progress.bar.balance { background: #FFCDD2; height: 10px; margin: 14px 0; }
progress.bar.balance::-webkit-progress-bar { background: #FFCDD2; }
progress.bar.balance::-webkit-progress-value { background: #4CAF50; }
progress.bar.balance::-moz-progress-bar { background: #4CAF50; }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: 13px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.delta .mi { font-size: 16px; }
.compare { display: flex; }
.compare > div { flex: 1; text-align: center; padding: 0 8px; }
.compare > div + div { border-left: 1px solid var(--grey-300); }
.compare small { display: block; font-size: 12px; color: var(--grey-600); }
.compare b { display: block; font-size: 22px; margin: 6px 0 2px; }

/* Banner header (Staff Management) and big two-up cards */
.hero-banner { text-align: center; color: #fff; padding: 24px; border-radius: 16px; margin-bottom: 24px; background: linear-gradient(135deg, #5C6BC0, #303F9F); }
.hero-banner .mi { font-size: 48px; }
.hero-banner h2 { margin: 12px 0 8px; font-size: 24px; }
.hero-banner p { margin: 0; font-size: 14px; opacity: .9; }
.big-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.big-card { display: block; padding: 18px; border-radius: 16px; box-shadow: var(--shadow-3); text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), color-mix(in srgb, var(--c) 5%, #fff)); }
.big-card .bc-top { display: flex; align-items: center; gap: 12px; }
.big-card .circle { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, #fff); }
.big-card .circle .mi { font-size: 32px; color: var(--c); }
.big-card .bc-text { flex: 1; }
.big-card strong { display: block; font-size: 18px; color: var(--c); }
.big-card .bc-text span { font-size: 13px; color: var(--grey-600); }
.big-card .bc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); }
.big-card .bc-chips span { padding: 4px 10px; border-radius: 8px; font-size: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.group-head { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; padding: 10px 14px; border-radius: 10px; background: rgba(33,150,243,.1); color: #1976D2; font-weight: 700; }
.group-head + .menu-grid { margin-bottom: 20px; }

/* Summary strip under the app bar (month selector + total) */
.summary-strip { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; margin: -20px -20px 16px; background: color-mix(in srgb, var(--c) 10%, #fff); align-items: center; }
.tabs + .summary-strip { margin-top: -16px; }
.summary-strip small { display: block; color: var(--grey-600); }
.summary-strip b { font-size: 20px; color: var(--c); filter: brightness(.85); }
.summary-strip .right { text-align: right; }
.status-chip { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; color: #fff; background: var(--c); }
.gender-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.gender-avatar.m { background: #BBDEFB; color: #1976D2; }
.gender-avatar.f { background: #F8BBD0; color: #C2185B; }
.sib-mark { font-size: 15px; color: #00897B; vertical-align: -2px; margin-left: 4px; }
.info-strip { display: flex; align-items: center; gap: 8px; padding: 8px 16px; margin: 0 -20px 8px; background: #E3F2FD; color: #0D47A1; font-size: 13px; }
.info-strip .mi { font-size: 18px; color: #1976D2; }
.id-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.id-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-2); text-align: center; border-top: 6px solid var(--primary); }
.id-card img { width: 96px; height: 110px; object-fit: cover; border-radius: 8px; margin: 14px auto 8px; display: block; background: #EEE; }
.id-card strong { display: block; font-size: 14px; padding: 0 10px; }
.id-card span { display: block; font-size: 12px; color: var(--grey-700); }
.id-card .idc-school { background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 6px; margin-top: 10px; }
.month-form { display: flex; align-items: center; gap: 8px; }
@media (max-width: 600px) {
  .tabs, .summary-strip { margin-left: -16px; margin-right: -16px; }
  .tabs { margin-top: -16px; }
  .info-strip { margin: 0 -16px 8px; }
}
.amt-c { color: var(--c); }
.mi[class*="c-"] { color: var(--c); }
.card.c-green7 .tile-lead .mi, .card.c-red .tile-lead .mi, .card.c-orange .tile-lead .mi { color: var(--c); }
.toolbar .card-title { margin-right: auto; }
.rrow.green, .rrow.red { color: inherit; }
.summary-strip .field-outlined > span { background: color-mix(in srgb, var(--c) 10%, #fff); }
.summary-strip .field-outlined select { min-width: 190px; background: #fff; }
.c-lightgreen { --c: #689F38; }
.tb-title { margin: 12px 0 4px; letter-spacing: 1px; font-size: 20px; }
.tb-logo { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 6px; }
details.xp summary .xp-title progress.bar { margin-top: 6px; }
.hero-banner.hero-brown { background: linear-gradient(135deg, #8D6E63, #4E342E); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card.tile { display: flex; }
a.card:hover { box-shadow: var(--shadow-3); }
.c-pink { --c: #E91E63; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; }
.q-head { display: flex; gap: 12px; align-items: flex-start; }
.q-text { flex: 1; font-weight: 600; padding-top: 8px; }
.q-opts { margin: 10px 0 8px 52px; padding: 0 0 0 18px; }
.q-opts li { padding: 4px 6px; border-radius: 6px; }
.q-correct { background: #E8F5E9; color: #2E7D32; font-weight: 600; }
.rich-text p { margin: 0 0 8px; }
.rich-text h3, .rich-text h4 { margin: 10px 0 6px; }
.pager { justify-content: space-between; }
.pager > * { flex: 0 0 auto; }

/* ===================================================================== STUDENT REPORT SHEET
   An exact copy of the Windows app's PDF (lib/utils/report_sheet_pdf_generator.dart):
   A4 page, margins 22pt left/right and 20pt top/bottom, Helvetica in the same
   point sizes, the same fixed column widths and PdfColors. Every size here is
   in pt so screen preview, print and "Save as PDF" match the app's PDF. */
.rs-count { text-align: center; font-weight: 700; font-size: 16px; }
.rs-opts { align-items: center; gap: 16px; }
.rs-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-bottom: 8px; }
.rs-frame { width: 100%; display: flex; justify-content: center; }
.rs-sheet {
  position: relative; box-sizing: border-box; flex: none;
  width: 595.28pt; min-height: 841.89pt; padding: 20pt 22pt;
  background: #fff; color: #000; overflow: hidden;
  font-family: Helvetica, Arial, 'Liberation Sans', sans-serif; font-size: 8pt; line-height: 1.17;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.rs-sheet * { box-sizing: border-box; }
/* Watermark: full page, 80 rows x 5 columns, 9pt bold blueGrey700 @ 6%, logo 250pt @ 12% */
.rs-watermark { position: absolute; inset: 0; pointer-events: none; }
.rs-wm-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-evenly; opacity: .06; }
.rs-wm-row { display: flex; justify-content: space-between; white-space: nowrap; font-size: 9pt; font-weight: 700; color: #455A64; line-height: 1; }
.rs-wm-row span { flex: none; }
.rs-wm-logo { position: absolute; left: 50%; top: 50%; width: 250pt; height: 250pt; object-fit: contain; transform: translate(-50%, -50%); opacity: .12; }
.rs-body { position: relative; display: flex; flex-direction: column; min-height: calc(841.89pt - 40pt); transform-origin: top left; }
.rs-body > .rs-gap4 { height: 4pt; flex: none; }

/* (a) Header */
.rs-head { display: flex; align-items: flex-start; }
.rs-logo { width: 60pt; height: 60pt; object-fit: contain; flex: none; }
.rs-school { flex: 1; text-align: center; padding: 0 10pt; }
.rs-school-name { font-size: 16pt; font-weight: 700; }
.rs-addr { margin-top: 2pt; font-size: 9pt; }
.rs-contact { margin-top: 2pt; font-size: 8pt; }
.rs-motto { margin-top: 2pt; font-size: 8pt; font-style: italic; }
.rs-photo-box { width: 60pt; height: 70pt; flex: none; border: 0.75pt solid #BDBDBD; display: flex; align-items: center; justify-content: center;
  font-size: 7pt; color: #9E9E9E; overflow: hidden; }
.rs-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.rs-title { margin-top: 6pt; padding: 4pt 0; background: #424242; color: #fff; text-align: center; font-size: 12pt; font-weight: 700; }
.rs-period { display: flex; justify-content: space-between; margin-top: 4pt; font-size: 9pt; font-weight: 700; }

/* Tables: borders as PdfColors greys, no spacing */
.rs-sheet table { border-collapse: collapse; }
.rs-sheet th, .rs-sheet td { padding: 0; }

/* (b) Bio data: grey600 border, equal columns, padding 4, label 7 / value 9 */
table.rs-bio { width: 100%; table-layout: fixed; }
.rs-bio td { border: 0.75pt solid #757575; padding: 4pt; vertical-align: top; overflow-wrap: anywhere; }
.rs-bio-l { display: block; font-size: 7pt; font-weight: 700; color: #616161; }
.rs-bio-v { display: block; margin-top: 1pt; font-size: 9pt; font-weight: 700; }

/* (c) Academic performance */
.rs-band { padding: 3pt 0; background: #EEEEEE; text-align: center; font-size: 10pt; font-weight: 700; }
.rs-band.sm { padding: 2pt 0; font-size: 8pt; }
table.rs-acad { width: 100%; table-layout: fixed; }
.rs-acad th, .rs-acad td { border: 0.75pt solid #9E9E9E; }
.rs-acad th { background: #E0E0E0; padding: 3pt; font-size: 8pt; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; }
.rs-acad th.f7 { font-size: 7pt; }
.rs-acad th.rs-ca { background: #E3F2FD; color: #0D47A1; font-size: 7pt; padding: 4pt; white-space: normal; line-height: 1.1; }
.rs-acad th.wrap { white-space: normal; line-height: 1.1; }
.rs-acad td { padding: 2pt 3pt; font-size: 8pt; text-align: center; vertical-align: middle; }
.rs-acad td.l { text-align: left; }
.rs-acad td.f7 { font-size: 7pt; }
.rs-acad td.b { font-weight: 700; }
.rs-acad td.rs-ca { background: #E3F2FD; color: #0D47A1; font-weight: 700; padding: 3pt; }
.rs-acad tbody tr:nth-child(even) td:not(.rs-ca) { background: #FAFAFA; }

/* (d)(e) Psychomotor, affective, holiday, bills — intrinsic widths, holiday expands, 8pt gaps */
.rs-row { display: flex; align-items: flex-start; gap: 8pt; }
.rs-box { flex: 0 0 auto; }
.rs-box.grow { flex: 1 1 auto; min-width: 0; }
.rs-box.solo { flex: 1 1 auto; }
table.rs-mini { width: 100%; }
.rs-box:not(.grow) table.rs-mini { width: auto; min-width: 100%; }
.rs-mini th, .rs-mini td { border: 0.75pt solid #9E9E9E; }
.rs-mini th { background: #E0E0E0; padding: 3pt; font-size: 7pt; font-weight: 700; text-align: center; white-space: nowrap; }
.rs-mini td { padding: 2pt 3pt; font-size: 7pt; text-align: left; vertical-align: middle; }
.rs-mini td.v { font-size: 8pt; text-align: center; white-space: nowrap; }
.rs-mini td.amt { text-align: right; white-space: nowrap; }
.rs-mini td.bb { font-size: 8pt; font-weight: 700; text-align: center; white-space: nowrap; }
.rs-mini td.nw { white-space: nowrap; }
.rs-mini tr.shade td { background: #F5F5F5; }
.rs-bill { border-bottom: 0; }
.rs-status { padding: 3pt 4pt; text-align: center; font-size: 7pt; font-weight: 700;
  border: 0.75pt solid #9E9E9E; border-top: 0; }
.rs-status.ok { background: #E8F5E9; color: #2E7D32; }
.rs-status.due { background: #FFEBEE; color: #C62828; }

/* (g) Comments */
.rs-comments { border: 0.75pt solid #9E9E9E; }
.rs-comment { padding: 6pt; }
.rs-comment + .rs-comment { border-top: 0.75pt solid #9E9E9E; }
.rs-comment .t { font-size: 8pt; font-weight: 700; }
.rs-comment p { margin: 3pt 0 6pt; font-size: 9pt; }
.rs-comment.hm p { margin-bottom: 8pt; }
.rs-sign { display: flex; align-items: baseline; font-size: 8pt; }
.rs-sign .grow { flex: 1; }
.rs-sign .gap12 { width: 12pt; }

/* (h) Grading key + footer */
.rs-key .t { font-size: 8pt; font-weight: 700; margin-bottom: 3pt; }
.rs-key-items { display: flex; flex-wrap: wrap; column-gap: 12pt; row-gap: 2pt; font-size: 7pt; }
.rs-footer { display: flex; justify-content: space-between; margin-top: 11pt; font-size: 7pt; color: #757575; }

/* Phones: the A4 page is shrunk to fit (portal.js) */
@media (max-width: 640px) { .rs-pages { gap: 12px; } }

/* ===================================================================== Printing: one sheet per A4 page */
@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0 !important; }
  body.shell, .main-col, .body-row, .rs-pages, .rs-frame { display: block !important; min-height: 0 !important; gap: 0 !important; }
  .content { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .quick-panel, .records-asof, .appbar, .sidebar, .scrim, .rs-picker, .rs-count, .info-strip, .tile-grid, .hero, .back, .banner { display: none !important; }
  .rs-frame { width: auto; }
  .rs-pages { padding: 0 !important; }
  main.content > :not(.rs-pages) { display: none !important; }
  .rs-sheet { width: 210mm; height: 296.8mm; min-height: 0; margin: 0 !important; box-shadow: none !important; zoom: 1 !important;
              break-inside: avoid; page-break-inside: avoid; }
  .rs-frame + .rs-frame .rs-sheet, .rs-frame + .rs-frame { break-before: page; page-break-before: always; }
  .rs-sheet, .rs-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
