:root {
  --app-navy: #202342;
  --app-indigo: #5146e5;
  --app-indigo-dark: #4037bd;
  --app-indigo-soft: #eeedff;
  --app-blue: #2f80ed;
  --app-purple: #8b5cf6;
  --app-orange: #f59e42;
  --app-red: #ef5b68;
  --app-green: #33b892;
  --app-teal: #2ca6a4;
  --app-bg: #f4f6fa;
  --app-card: #ffffff;
  --app-text: #292d45;
  --app-muted: #7a8197;
  --app-border: #e7e9f2;
  --app-sidebar-width: 278px;
  --app-topbar-height: 76px;
  --app-radius: 14px;
  --app-shadow: 0 5px 22px rgba(35, 39, 73, 0.055);
}

html {
  position: relative;
  min-height: 100%;
  font-size: 15px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--app-text);
  background:
    radial-gradient(circle at 12% 5%, rgba(81, 70, 229, 0.045), transparent 24rem),
    linear-gradient(180deg, #f7f8fc 0, var(--app-bg) 19rem);
  font-family: Tahoma, Arial, sans-serif;
  text-align: right;
}

a {
  color: var(--app-indigo);
  text-decoration: none;
}

a:hover {
  color: var(--app-indigo-dark);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-icon,
.nav-icon,
.summary-arrow,
.system-arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 1045;
  width: var(--app-sidebar-width);
  overflow-y: auto;
  background: #fff;
  border-inline-end: 1px solid var(--app-border);
  box-shadow: 4px 0 18px rgba(39, 42, 75, 0.035);
}

.sidebar-brand {
  height: var(--app-topbar-height);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.35rem;
  color: var(--app-navy);
  border-bottom: 1px solid var(--app-border);
}

.sidebar-brand:hover {
  color: var(--app-indigo);
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, var(--app-indigo), var(--app-purple));
  border-radius: 12px;
  box-shadow: 0 7px 16px rgba(81, 70, 229, 0.25);
}

.brand-icon .app-icon {
  width: 24px;
  height: 24px;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  color: var(--app-navy);
  font-size: 0.98rem;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 0.12rem;
  color: var(--app-muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.sidebar-nav {
  padding: 1rem 0.85rem 2rem;
}

.nav-group {
  margin-bottom: 0.38rem;
}

.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.62rem 0.72rem;
  color: #555d75;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-group-toggle > span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-group-toggle:hover,
.nav-group-toggle:not(.collapsed) {
  color: var(--app-indigo);
  background: #f7f6ff;
}

.nav-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.nav-group-toggle:not(.collapsed) .nav-chevron {
  transform: rotate(180deg);
}

.nav-group-links {
  position: relative;
  margin: 0.18rem 1rem 0.45rem 0;
  padding-inline-start: 0.8rem;
  border-inline-start: 1px solid #e5e6ef;
}

.nav-group-links.collapsing {
  transition: height 0.2s ease;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 37px;
  margin-bottom: 0.15rem;
  padding: 0.48rem 0.72rem;
  color: #656c82;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.sidebar-link:hover {
  color: var(--app-indigo);
  background: #f6f5ff;
  transform: translateX(-2px);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--app-indigo), #6258ea);
  box-shadow: 0 7px 15px rgba(81, 70, 229, 0.19);
}

.sidebar-link.active::after {
  content: "";
  position: absolute;
  inset-block: 10px;
  inset-inline-end: -0.82rem;
  width: 3px;
  background: var(--app-indigo);
  border-radius: 3px;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.app-topbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: var(--app-sidebar-width) 0;
  z-index: 1040;
  height: var(--app-topbar-height);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--app-border);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.6rem;
}

.topbar-start,
.topbar-user {
  display: flex;
  align-items: center;
}

.topbar-start {
  gap: 0.8rem;
}

.topbar-page span,
.topbar-page strong {
  display: block;
}

.topbar-eyebrow {
  margin-bottom: 0.12rem;
  color: var(--app-muted);
  font-size: 0.7rem;
}

.topbar-page strong {
  color: var(--app-navy);
  font-size: 1rem;
}

.topbar-user {
  gap: 0.65rem;
}

.user-avatar {
  width: 39px;
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--app-indigo);
  background: var(--app-indigo-soft);
  border: 1px solid #dedbff;
  border-radius: 50%;
  font-weight: 700;
}

.user-details strong,
.user-details span {
  display: block;
}

.user-details strong {
  color: var(--app-navy);
  font-size: 0.82rem;
}

.user-details span {
  margin-top: 0.1rem;
  color: var(--app-muted);
  font-size: 0.68rem;
}

.logout-button,
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  color: #6e7488;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 600;
}

.logout-button:hover {
  color: var(--app-red);
  background: #fff5f6;
  border-color: #ffd4d8;
}

.sidebar-toggle {
  width: 39px;
  padding: 0;
  color: var(--app-indigo);
}

.app-content {
  min-height: 100vh;
  margin-inline-start: var(--app-sidebar-width);
  padding-top: var(--app-topbar-height);
  display: flex;
  flex-direction: column;
}

.content-container {
  width: 100%;
  max-width: 1640px;
  margin-inline: auto;
  padding: 1.55rem;
  flex: 1;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.55rem;
  color: var(--app-muted);
  background: #fff;
  border-top: 1px solid var(--app-border);
  font-size: 0.75rem;
}

.auth-body {
  background: linear-gradient(145deg, #f0f1ff, #f8f9fc);
}

.auth-content {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-content > .row {
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--app-navy);
  font-weight: 700;
}

.text-muted {
  color: var(--app-muted) !important;
}

.card {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
}

.card-header {
  padding: 0.95rem 1.1rem;
  background: #fff;
  border-bottom: 1px solid var(--app-border);
  font-weight: 700;
}

.card-body {
  padding: 1.15rem;
}

.btn {
  border-radius: 8px;
  font-weight: 600;
}

.btn-primary {
  background: var(--app-indigo);
  border-color: var(--app-indigo);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--app-indigo-dark);
  border-color: var(--app-indigo-dark);
}

.btn-success {
  background: var(--app-green);
  border-color: var(--app-green);
}

.btn-outline-primary {
  color: var(--app-indigo);
  border-color: var(--app-indigo);
}

.btn-outline-primary:hover {
  background: var(--app-indigo);
  border-color: var(--app-indigo);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(81, 70, 229, 0.15);
}

.form-label {
  margin-bottom: 0.4rem;
  color: #555c72;
  font-size: 0.84rem;
  font-weight: 600;
}

.form-control,
.form-select {
  min-height: 42px;
  color: var(--app-text);
  background-color: #fff;
  border-color: #dfe2ec;
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  border-color: #aaa4fa;
}

textarea.form-control {
  min-height: auto;
}

.table-responsive {
  border-radius: inherit;
}

.table {
  margin-bottom: 0;
  color: var(--app-text);
  vertical-align: middle;
}

.table > :not(caption) > * > * {
  padding: 0.82rem 0.75rem;
  border-bottom-color: var(--app-border);
}

.table thead th,
.table-light th {
  color: #596078;
  background: #f7f8fc;
  border-bottom-width: 1px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
  background: #fafaff;
}

.badge {
  padding: 0.42em 0.72em;
  border-radius: 50rem;
  font-weight: 600;
}

.alert {
  border: 0;
  border-radius: 10px;
}

.pagination {
  gap: 0.25rem;
}

.page-link {
  color: var(--app-indigo);
  border-color: var(--app-border);
  border-radius: 7px !important;
}

.dashboard-page {
  max-width: 1460px;
  margin-inline: auto;
}

.dashboard-section-block {
  margin-bottom: 1.25rem;
}

.dashboard-welcome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 142px;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.7rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.17), transparent 22%),
    linear-gradient(120deg, #3f3bb8, #5b4de3 58%, #7457ea);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(71, 62, 194, 0.2);
}

.dashboard-welcome::after {
  content: "";
  position: absolute;
  inset-inline-end: -45px;
  inset-block-end: -70px;
  width: 220px;
  height: 220px;
  border: 35px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.welcome-copy,
.welcome-year {
  position: relative;
  z-index: 1;
}

.welcome-kicker {
  color: #dcd9ff;
  font-size: 0.74rem;
}

.welcome-copy h1 {
  margin: 0.35rem 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.welcome-copy p {
  margin: 0;
  color: #e9e7ff;
  font-size: 0.86rem;
}

.welcome-year {
  min-width: 190px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.welcome-year span,
.welcome-year strong {
  display: block;
}

.welcome-year span {
  color: #dfddff;
  font-size: 0.7rem;
}

.welcome-year strong {
  margin-top: 0.3rem;
  color: #fff;
  font-size: 1rem;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.summary-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 126px;
  padding: 1.1rem;
  overflow: hidden;
  color: var(--app-text);
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.summary-card:hover {
  color: var(--app-text);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(39, 42, 75, 0.09);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -34px;
  inset-block-end: -42px;
  width: 108px;
  height: 108px;
  background: var(--summary-soft);
  border-radius: 50%;
  opacity: 0.75;
}

.summary-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--summary-color);
  background: var(--summary-soft);
  border-radius: 14px;
}

.summary-icon .app-icon {
  width: 25px;
  height: 25px;
}

.summary-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.summary-copy small,
.summary-copy strong,
.summary-copy em {
  display: block;
}

.summary-copy small {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-style: normal;
}

.summary-copy strong {
  margin: 0.25rem 0 0.2rem;
  color: var(--app-navy);
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  line-height: 1.2;
}

.summary-copy em {
  color: var(--summary-color);
  font-size: 0.68rem;
  font-style: normal;
}

.summary-arrow {
  position: absolute;
  inset-inline-end: 0.8rem;
  inset-block-start: 0.8rem;
  width: 16px;
  height: 16px;
  color: #c1c5d2;
  transform: scaleX(-1);
}

.summary-indigo { --summary-color: var(--app-indigo); --summary-soft: #eeedff; }
.summary-blue { --summary-color: var(--app-blue); --summary-soft: #eaf4ff; }
.summary-orange { --summary-color: #e98924; --summary-soft: #fff3e4; }
.summary-purple { --summary-color: var(--app-purple); --summary-soft: #f3edff; }

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(270px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  display: grid;
  gap: 1rem;
}

.dashboard-panel {
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
}

.quick-links-panel {
  margin-bottom: 1.25rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-kicker {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--app-indigo);
  font-size: 0.68rem;
  font-weight: 700;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.panel-heading > a {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.panel-heading > a:hover {
  color: var(--app-indigo);
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.dashboard-quick-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  min-height: 68px;
  padding: 0.78rem;
  color: var(--app-text);
  background: #fbfbfd;
  border: 1px solid #eff0f5;
  border-radius: 10px;
}

.dashboard-quick-link:hover {
  color: var(--app-text);
  background: #fff;
  border-color: #dcd9ff;
  box-shadow: 0 5px 14px rgba(43, 45, 80, 0.06);
}

.dashboard-quick-link > span:last-child {
  min-width: 0;
}

.dashboard-quick-link strong,
.dashboard-quick-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quick-link strong {
  font-size: 0.8rem;
}

.dashboard-quick-link small {
  margin-top: 0.12rem;
  color: var(--app-muted);
  font-size: 0.64rem;
}

.quick-icon,
.compact-icon,
.payroll-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
}

.quick-icon {
  width: 40px;
  height: 40px;
}

.quick-icon .app-icon {
  width: 19px;
  height: 19px;
}

.quick-indigo { color: var(--app-indigo); background: #eeedff; }
.quick-red { color: var(--app-red); background: #fff0f2; }
.quick-blue { color: var(--app-blue); background: #eaf4ff; }
.quick-orange { color: #e98924; background: #fff3e4; }
.quick-teal { color: var(--app-teal); background: #e8f8f7; }
.quick-purple { color: var(--app-purple); background: #f3edff; }
.quick-green { color: var(--app-green); background: #eaf9f4; }

.compact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.financial-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.financial-overview-card {
  position: relative;
  min-height: 130px;
  padding: 1rem;
  overflow: hidden;
  background: #fbfbfd;
  border: 1px solid #eff0f5;
  border-radius: 12px;
}

.financial-overview-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -25px;
  inset-block-end: -35px;
  width: 90px;
  height: 90px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.055;
}

.financial-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
  color: currentColor;
  background: #fff;
  border: 1px solid currentColor;
  border-radius: 10px;
}

.financial-overview-card small,
.financial-overview-card strong {
  position: relative;
  z-index: 1;
  display: block;
}

.financial-overview-card small {
  color: var(--app-muted);
  font-size: 0.68rem;
}

.financial-overview-card strong {
  margin-top: 0.28rem;
  color: var(--app-navy);
  font-size: 1.22rem;
}

.accent-red { color: var(--app-red); }
.accent-orange { color: #e98924; }
.accent-purple { color: var(--app-purple); }
.accent-green { color: var(--app-green); }

.student-overview {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.5fr);
  gap: 1rem;
}

.student-total {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #3f3bb8, #6258ea);
  border-radius: 13px;
}

.student-total-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 13px;
}

.student-total small,
.student-total strong,
.student-total div > span {
  display: block;
}

.student-total small {
  color: #dcd9ff;
  font-size: 0.68rem;
}

.student-total strong {
  margin: 0.2rem 0;
  color: #fff;
  font-size: 1.65rem;
}

.student-total div > span {
  color: #e9e7ff;
  font-size: 0.65rem;
}

.student-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.student-links a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.78rem;
  color: #555c72;
  background: #fafafd;
  border: 1px solid #eff0f5;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 600;
}

.student-links a:hover {
  color: var(--app-indigo);
  background: #fff;
  border-color: #dcd9ff;
}

.student-links .app-icon {
  width: 19px;
  height: 19px;
  color: var(--app-indigo);
}

.dashboard-lower-columns {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  margin-bottom: 1.25rem;
}

.compact-metric {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  color: var(--app-text);
  background: #fafafd;
  border: 1px solid #eff0f5;
  border-radius: 11px;
}

.compact-metric:hover {
  color: var(--app-text);
  border-color: #dddafc;
}

.compact-icon,
.payroll-icon {
  width: 42px;
  height: 42px;
}

.compact-metric small,
.compact-metric strong {
  display: block;
}

.compact-metric small {
  color: var(--app-muted);
  font-size: 0.68rem;
}

.compact-metric strong {
  margin-top: 0.15rem;
  color: var(--app-navy);
  font-size: 1.3rem;
}

.bg-soft-indigo { color: var(--app-indigo); background: #eeedff; }
.bg-soft-blue { color: var(--app-blue); background: #eaf4ff; }
.bg-soft-orange { color: #e98924; background: #fff3e4; }
.bg-soft-teal { color: var(--app-teal); background: #e8f8f7; }
.bg-soft-red { color: var(--app-red); background: #fff0f2; }
.bg-soft-purple { color: var(--app-purple); background: #f3edff; }
.bg-soft-green { color: var(--app-green); background: #eaf9f4; }

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #eff0f5;
  border-radius: 11px;
}

.finance-metric {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 1rem;
}

.finance-metric + .finance-metric {
  border-inline-start: 1px solid #eff0f5;
}

.finance-dot {
  width: 10px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 5px;
}

.dot-red { background: var(--app-red); }
.dot-orange { background: var(--app-orange); }
.dot-indigo { background: var(--app-indigo); }

.finance-metric small,
.finance-metric strong {
  display: block;
}

.finance-metric small {
  color: var(--app-muted);
  font-size: 0.67rem;
}

.finance-metric strong {
  margin-top: 0.25rem;
  color: var(--app-navy);
  font-size: 1.15rem;
}

.payroll-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.payroll-item {
  padding: 0.85rem;
  background: #fafafd;
  border: 1px solid #eff0f5;
  border-radius: 11px;
}

.payroll-item small,
.payroll-item strong,
.payroll-item em {
  display: block;
}

.payroll-item small {
  margin-top: 0.65rem;
  color: var(--app-muted);
  font-size: 0.65rem;
}

.payroll-item strong {
  margin-top: 0.22rem;
  color: var(--app-navy);
  font-size: 1.08rem;
}

.payroll-item em {
  margin-top: 0.2rem;
  color: var(--app-muted);
  font-size: 0.61rem;
  font-style: normal;
}

.system-links {
  display: grid;
}

.system-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.78rem 0;
  color: #555c72;
  border-bottom: 1px solid #eff0f5;
  font-size: 0.76rem;
  font-weight: 600;
}

.system-links a:last-child {
  border-bottom: 0;
}

.system-links a:hover {
  color: var(--app-indigo);
}

.system-links a > span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.system-links .app-icon {
  width: 18px;
  height: 18px;
  color: var(--app-indigo);
}

.system-arrow {
  width: 14px;
  height: 14px;
  color: #b7bbc8;
  transform: scaleX(-1);
}

.school-status-panel {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  color: #fff;
  background: linear-gradient(145deg, #202342, #343866);
  border: 0;
}

.status-icon {
  width: 43px;
  height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 11px;
}

.school-status-panel small,
.school-status-panel strong,
.school-status-panel div > span {
  display: block;
}

.school-status-panel small {
  color: #bfc3dd;
  font-size: 0.65rem;
}

.school-status-panel strong {
  margin: 0.25rem 0 0.4rem;
  color: #fff;
  font-size: 0.9rem;
}

.school-status-panel div > span {
  color: #cfd2e5;
  font-size: 0.65rem;
  line-height: 1.6;
}

@media (max-width: 1279.98px) {
  .dashboard-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payroll-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .app-topbar {
    inset-inline: 0;
    height: 66px;
  }

  .app-sidebar {
    width: min(86vw, 300px);
    box-shadow: -10px 0 30px rgba(32, 35, 66, 0.18);
  }

  .app-sidebar.collapsing {
    height: 100vh;
    transition: width 0.2s ease;
  }

  .app-content {
    margin-inline-start: 0;
    padding-top: 66px;
  }

  .content-container {
    padding: 1rem;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .financial-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .topbar-inner {
    padding: 0 0.85rem;
  }

  .topbar-eyebrow,
  .user-details {
    display: none;
  }

  .dashboard-welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-year {
    width: 100%;
  }

  .dashboard-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-metrics,
  .finance-metrics,
  .student-overview {
    grid-template-columns: 1fr;
  }

  .finance-metric + .finance-metric {
    border-inline-start: 0;
    border-top: 1px solid #eff0f5;
  }
}

@media (max-width: 575.98px) {
  .topbar-page strong {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logout-button span {
    display: none;
  }

  .content-container {
    padding: 0.75rem;
  }

  .dashboard-welcome {
    min-height: 0;
    padding: 1.15rem;
    border-radius: 14px;
  }

  .dashboard-summary-grid,
  .dashboard-quick-grid,
  .payroll-grid,
  .financial-overview-grid,
  .student-links {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 105px;
  }

  .dashboard-panel {
    padding: 0.9rem;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .table > :not(caption) > * > * {
    padding: 0.68rem 0.55rem;
  }

  .app-footer {
    padding-inline: 0.75rem;
  }
}

@media print {
  .app-topbar,
  .app-sidebar,
  .app-footer {
    display: none !important;
  }

  .app-content {
    margin: 0;
    padding: 0;
  }

  .content-container {
    max-width: none;
    padding: 0;
  }

  .card,
  .dashboard-panel {
    box-shadow: none !important;
  }
}

/* Students and payments */
.module-page {
  display: grid;
  gap: 1.25rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.35rem 0 0.25rem;
}

.page-header h1 {
  margin: 0.2rem 0 0.35rem;
  color: var(--app-navy);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-header p {
  max-width: 720px;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.83rem;
  line-height: 1.7;
}

.page-eyebrow {
  color: var(--app-indigo);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.page-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.action-plus {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}

.filter-card,
.data-table-card,
.form-section-card,
.detail-card,
.confirmation-card,
.statement-student-card {
  background: #fff;
  border: 1px solid #e8eaf2;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(32, 35, 66, 0.045);
}

.filter-card,
.form-section-card,
.detail-card,
.confirmation-card {
  padding: 1.2rem;
}

.card-section-heading,
.form-section-heading,
.data-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-section-heading,
.form-section-heading {
  margin-bottom: 1.15rem;
}

.card-section-heading > div,
.form-section-heading {
  display: flex;
  align-items: center;
}

.card-section-heading > div,
.form-section-heading {
  gap: 0.75rem;
}

.card-section-heading h2,
.form-section-heading h2,
.data-table-header h2 {
  margin: 0;
  color: var(--app-navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.card-section-heading p,
.form-section-heading p,
.data-table-header p {
  margin: 0.2rem 0 0;
  color: var(--app-muted);
  font-size: 0.69rem;
}

.section-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
}

.section-icon .app-icon {
  width: 19px;
  height: 19px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.data-table-card {
  min-width: 0;
  overflow: hidden;
}

.data-table-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #eceef4;
}

.module-table {
  min-width: 1080px;
}

.module-table thead th {
  padding: 0.8rem 0.75rem;
  color: #697087;
  background: #f8f9fc;
  border-bottom: 1px solid #e9ebf2;
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.module-table tbody td {
  padding: 0.82rem 0.75rem;
  color: #454b60;
  border-color: #eff0f5;
  font-size: 0.72rem;
  vertical-align: middle;
}

.module-table tbody tr:hover {
  background: #fbfbfe;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 155px;
}

.student-cell strong {
  color: var(--app-navy);
  font-weight: 700;
}

.student-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--app-indigo);
  background: #eeedff;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.gender-badge,
.status-badge,
.section-chip,
.payment-method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.gender-male { color: #2878c7; background: #eaf4ff; }
.gender-female { color: #8a58c7; background: #f4edff; }
.status-active { color: #128064; background: #e8f8f2; }
.status-suspended { color: #c37318; background: #fff4e4; }
.status-archived { color: #687086; background: #eef0f4; }
.status-withdrawn { color: #bd4355; background: #fff0f2; }
.section-chip { min-width: 31px; color: var(--app-indigo); background: #f0efff; }
.payment-method-badge { color: #3c668f; background: #edf5fc; }

.money-cell {
  color: var(--app-navy) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.money-paid { color: var(--app-green) !important; }
.money-due { color: var(--app-red) !important; }
.money-settled { color: var(--app-green) !important; }

.table-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.table-actions .btn {
  padding: 0.31rem 0.52rem;
  font-size: 0.63rem;
}

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-height: 180px;
  color: var(--app-muted);
  text-align: center;
}

.empty-state strong {
  color: var(--app-navy);
  font-size: 0.86rem;
}

.empty-state span:last-child {
  font-size: 0.7rem;
}

.empty-state-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  color: var(--app-indigo);
  background: #eeedff;
  border-radius: 13px;
}

.empty-state-icon .app-icon {
  width: 22px;
  height: 22px;
}

.form-page {
  max-width: 1100px;
  margin-inline: auto;
}

.form-section-card + .form-section-card {
  margin-top: 1rem;
}

.form-section-card .form-label {
  color: #464d61;
  font-size: 0.71rem;
  font-weight: 700;
}

.form-section-card .form-control,
.form-section-card .form-select {
  min-height: 43px;
}

.form-section-card textarea.form-control {
  min-height: 108px;
}

.form-submit-bar {
  position: sticky;
  z-index: 5;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e4e6ef;
  border-radius: 13px;
  box-shadow: 0 10px 30px rgba(32, 35, 66, 0.1);
  backdrop-filter: blur(10px);
}

.form-submit-bar strong,
.form-submit-bar span {
  display: block;
}

.form-submit-bar strong {
  color: var(--app-navy);
  font-size: 0.79rem;
}

.form-submit-bar span {
  margin-top: 0.15rem;
  color: var(--app-muted);
  font-size: 0.64rem;
}

.readonly-field {
  color: #5c6378;
  background: #f8f9fc;
  border-style: dashed;
}

.receipt-number-field,
.receipt-code {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.form-hint {
  margin-top: 0.35rem;
  color: var(--app-muted);
  font-size: 0.64rem;
}

.generated-receipt-note {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  color: #4d5670;
  background: #f8f8fd;
  border: 1px dashed #cfd0e6;
  border-radius: 8px;
  font-size: 0.69rem;
}

.generated-receipt-note .app-icon {
  width: 18px;
  height: 18px;
  color: var(--app-indigo);
}

.student-profile-hero,
.statement-student-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 8% 20%, rgba(109, 94, 252, 0.1), transparent 30%),
    #fff;
}

.student-profile-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, var(--app-indigo), #8d7dfc);
  border-radius: 17px;
  box-shadow: 0 10px 20px rgba(109, 94, 252, 0.2);
  font-size: 1.4rem;
  font-weight: 800;
}

.profile-kicker {
  color: var(--app-muted);
  font-size: 0.65rem;
}

.student-profile-main h2 {
  margin: 0.15rem 0 0.35rem;
  color: var(--app-navy);
  font-size: 1.25rem;
  font-weight: 800;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-meta span {
  padding: 0.22rem 0.5rem;
  color: #62697d;
  background: #f4f5f9;
  border-radius: 6px;
  font-size: 0.63rem;
  font-weight: 700;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.detail-list > div {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eff0f5;
}

.detail-list > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-list .detail-wide {
  grid-column: 1 / -1;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
}

.detail-list dt {
  color: var(--app-muted);
  font-size: 0.64rem;
  font-weight: 600;
}

.detail-list dd {
  margin-top: 0.28rem;
  color: var(--app-navy);
  font-size: 0.77rem;
  font-weight: 700;
}

.detail-card-financial {
  display: flex;
  flex-direction: column;
}

.financial-highlight {
  flex: 1;
  margin-bottom: 1rem;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #1a9277, #35b89a);
  border-radius: 11px;
}

.financial-highlight span,
.financial-highlight strong,
.financial-highlight small {
  display: block;
}

.financial-highlight span,
.financial-highlight small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.65rem;
}

.financial-highlight strong {
  margin: 0.25rem 0;
  font-size: 1.65rem;
}

.notes-box {
  min-height: 70px;
  padding: 0.85rem;
  color: #555d71;
  background: #fafafd;
  border: 1px solid #eff0f5;
  border-radius: 9px;
  font-size: 0.73rem;
  line-height: 1.8;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.85rem;
  color: var(--app-muted);
  font-size: 0.62rem;
}

.narrow-page {
  max-width: 820px;
  margin-inline: auto;
}

.confirmation-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eff0f5;
}

.confirmation-profile span,
.confirmation-profile strong,
.confirmation-profile small {
  display: block;
}

.confirmation-profile div > span,
.confirmation-profile small {
  color: var(--app-muted);
  font-size: 0.65rem;
}

.confirmation-profile strong {
  margin: 0.2rem 0;
  color: var(--app-navy);
  font-size: 1rem;
}

.status-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.status-choice-grid form {
  display: flex;
}

.status-choice {
  width: 100%;
  padding: 0.9rem;
  text-align: start;
  background: #fff;
  border: 1px solid #e3e5ee;
  border-radius: 10px;
  transition: 0.15s ease;
}

.status-choice:hover:not(:disabled) {
  border-color: var(--app-indigo);
  box-shadow: 0 5px 15px rgba(109, 94, 252, 0.08);
}

.status-choice.current {
  background: #f4f3ff;
  border-color: #cfcbff;
}

.status-choice strong,
.status-choice span {
  display: block;
}

.status-choice strong {
  color: var(--app-navy);
  font-size: 0.75rem;
}

.status-choice span {
  margin-top: 0.2rem;
  color: var(--app-muted);
  font-size: 0.62rem;
}

.confirmation-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem;
  color: #78414b;
  background: #fff5f6;
  border: 1px solid #f4d7dc;
  border-radius: 10px;
}

.confirmation-alert-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--app-red);
  border-radius: 50%;
  font-weight: 800;
}

.confirmation-alert strong {
  display: block;
  font-size: 0.76rem;
}

.confirmation-alert p {
  margin: 0.25rem 0 0;
  font-size: 0.66rem;
  line-height: 1.7;
}

.confirmation-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.confirmation-details div {
  padding: 0.75rem;
  background: #fafafd;
  border: 1px solid #eff0f5;
  border-radius: 9px;
}

.confirmation-details dt,
.confirmation-details dd {
  margin: 0;
}

.confirmation-details dt {
  color: var(--app-muted);
  font-size: 0.62rem;
}

.confirmation-details dd {
  margin-top: 0.25rem;
  color: var(--app-navy);
  font-size: 0.75rem;
  font-weight: 800;
}

.statement-reference {
  min-width: 150px;
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid #e9eaf1;
}

.statement-reference span,
.statement-reference strong {
  display: block;
}

.statement-reference span {
  color: var(--app-muted);
  font-size: 0.63rem;
}

.statement-reference strong {
  margin-top: 0.2rem;
  color: var(--app-navy);
  font-size: 0.82rem;
}

.financial-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.financial-summary-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 118px;
  padding: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8eaf2;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(32, 35, 66, 0.045);
}

.financial-summary-card::after {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  content: "";
}

.financial-summary-card.annual-fee::after { background: var(--app-indigo); }
.financial-summary-card.total-paid::after { background: var(--app-green); }
.financial-summary-card.remaining-balance::after { background: var(--app-orange); }

.financial-card-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
}

.annual-fee .financial-card-icon { color: var(--app-indigo); background: #eeedff; }
.total-paid .financial-card-icon { color: var(--app-green); background: #e8f8f2; }
.remaining-balance .financial-card-icon { color: var(--app-orange); background: #fff4e7; }

.financial-card-icon .app-icon {
  width: 22px;
  height: 22px;
}

.financial-summary-card span,
.financial-summary-card strong,
.financial-summary-card small {
  display: block;
}

.financial-summary-card div > span,
.financial-summary-card small {
  color: var(--app-muted);
  font-size: 0.64rem;
}

.financial-summary-card strong {
  margin: 0.2rem 0;
  color: var(--app-navy);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.notes-cell {
  min-width: 170px;
  max-width: 260px;
  white-space: normal;
}

.overdue-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.report-summary-card {
  position: relative;
  min-height: 116px;
  padding: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8eaf2;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(32, 35, 66, 0.045);
}

.report-summary-card::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  content: "";
}

.report-summary-card.accent-indigo::before { background: var(--app-indigo); }
.report-summary-card.accent-blue::before { background: var(--app-blue); }
.report-summary-card.accent-green::before { background: var(--app-green); }
.report-summary-card.accent-red::before { background: var(--app-red); }

.report-summary-card span,
.report-summary-card strong,
.report-summary-card small {
  display: block;
}

.report-summary-card span,
.report-summary-card small {
  color: var(--app-muted);
  font-size: 0.64rem;
}

.report-summary-card strong {
  margin: 0.45rem 0 0.25rem;
  color: var(--app-navy);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

/* Standalone printable receipt */
.receipt-body {
  min-height: 100vh;
  padding: 2.5rem 1rem;
  background: #f3f5f9;
  font-family: Arial, sans-serif;
}

.official-receipt {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe2eb;
  border-radius: 4px;
  box-shadow: 0 18px 45px rgba(32, 35, 66, 0.1);
}

.receipt-brand-bar {
  height: 7px;
  background: linear-gradient(90deg, #2f3568, #6d5efc, #4ea3f1);
}

.official-receipt-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 2rem 2.25rem 1.5rem;
  border-bottom: 1px solid #e8eaf0;
}

.receipt-school-mark {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, #2f3568, #6d5efc);
  border-radius: 14px;
  font-size: 1.35rem;
  font-weight: 800;
}

.official-receipt-header span,
.official-receipt-header p,
.receipt-number-block span {
  color: #7a8091;
  font-size: 0.72rem;
}

.official-receipt-header h1 {
  margin: 0.18rem 0;
  color: #202342;
  font-size: 1.35rem;
  font-weight: 800;
}

.official-receipt-header p {
  margin: 0;
}

.receipt-number-block {
  padding: 0.7rem 0.9rem;
  text-align: center;
  background: #f7f7fc;
  border: 1px solid #e5e6ef;
  border-radius: 9px;
}

.receipt-number-block span,
.receipt-number-block strong {
  display: block;
}

.receipt-number-block strong {
  margin-top: 0.2rem;
  color: #383e6e;
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.receipt-amount-panel {
  margin: 1.5rem 2.25rem;
  padding: 1.2rem;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #2f3568, #484f8c);
  border-radius: 11px;
}

.receipt-amount-panel span,
.receipt-amount-panel strong,
.receipt-amount-panel small {
  display: block;
}

.receipt-amount-panel span,
.receipt-amount-panel small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
}

.receipt-amount-panel strong {
  margin: 0.2rem 0;
  font-size: 2rem;
}

.receipt-information {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 2.25rem;
}

.receipt-information > div {
  padding: 1rem 0;
  border-bottom: 1px solid #eceef3;
}

.receipt-information > div:nth-child(odd) {
  padding-inline-end: 1.25rem;
}

.receipt-information > div:nth-child(even) {
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid #eceef3;
}

.receipt-information .receipt-notes {
  grid-column: 1 / -1;
  padding-inline: 0;
  border-inline-start: 0;
}

.receipt-information span,
.receipt-information strong {
  display: block;
}

.receipt-information span {
  color: #858a9b;
  font-size: 0.68rem;
}

.receipt-information strong {
  margin-top: 0.3rem;
  color: #292e4d;
  font-size: 0.84rem;
}

.official-receipt-footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  align-items: end;
  gap: 1.5rem;
  padding: 2.2rem 2.25rem 1.6rem;
}

.official-receipt-footer div {
  color: #6e7486;
  text-align: center;
  font-size: 0.67rem;
}

.official-receipt-footer i {
  display: block;
  height: 1px;
  margin-top: 2.2rem;
  background: #aeb2bf;
}

.official-receipt-footer p {
  margin: 0;
  color: #999eac;
  font-size: 0.61rem;
  text-align: center;
}

.receipt-actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  background: #f8f9fc;
  border-top: 1px solid #e8eaf0;
}

@media (max-width: 1199.98px) {
  .overdue-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .page-header,
  .student-profile-hero,
  .statement-student-card,
  .form-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions,
  .page-header > .btn,
  .page-header > a {
    width: 100%;
  }

  .page-actions .btn,
  .page-actions a {
    flex: 1 1 auto;
  }

  .details-grid,
  .financial-summary-grid {
    grid-template-columns: 1fr;
  }

  .statement-reference {
    padding: 0.8rem 0 0;
    border-inline-start: 0;
    border-top: 1px solid #e9eaf1;
  }

  .form-submit-bar {
    position: static;
  }

  .form-submit-bar > div:last-child,
  .form-submit-bar .btn {
    width: 100%;
  }

  .confirmation-details {
    grid-template-columns: 1fr;
  }

  .official-receipt-header {
    grid-template-columns: auto 1fr;
    padding: 1.25rem;
  }

  .receipt-number-block {
    grid-column: 1 / -1;
  }

  .receipt-amount-panel {
    margin: 1rem 1.25rem;
  }

  .receipt-information {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
  }

  .receipt-information > div:nth-child(odd),
  .receipt-information > div:nth-child(even) {
    padding-inline: 0;
    border-inline-start: 0;
  }

  .receipt-information .receipt-notes {
    grid-column: auto;
  }

  .official-receipt-footer {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.5rem 1.25rem;
  }

  .official-receipt-footer p {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 575.98px) {
  .filter-card,
  .form-section-card,
  .detail-card,
  .confirmation-card {
    padding: 0.9rem;
  }

  .data-table-header {
    padding: 0.9rem;
  }

  .student-profile-main {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 13px;
  }

  .detail-list,
  .status-choice-grid,
  .overdue-summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-list > div,
  .detail-list > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid #eff0f5;
  }

  .detail-list > div:last-child {
    border-bottom: 0;
  }

  .receipt-body {
    padding: 0;
  }

  .official-receipt {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .receipt-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .no-print,
  .form-submit-bar,
  .page-actions {
    display: none !important;
  }

  .module-page,
  .print-page {
    display: block;
  }

  .print-page .page-header {
    margin-bottom: 14px;
  }

  .print-page .statement-student-card,
  .print-page .financial-summary-card,
  .print-page .data-table-card {
    break-inside: avoid;
    box-shadow: none !important;
  }

  .print-page .financial-summary-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 14px;
  }

  .print-page .module-table {
    min-width: 0;
  }

  .print-page .module-table th,
  .print-page .module-table td {
    padding: 7px;
    font-size: 10.5pt;
  }

  .receipt-body {
    min-height: 0;
    padding: 0;
    background: #fff;
  }

  .official-receipt {
    max-width: none;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .receipt-brand-bar {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .receipt-amount-panel,
  .receipt-school-mark {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  @page {
    size: A4;
    margin: 12mm;
  }
}

/* Formal A4 documents */
.receipt-reference-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #dfe2e8;
}

.receipt-reference-row > div {
  padding: 1rem 2.25rem;
}

.receipt-reference-row > div + div {
  border-inline-start: 1px solid #dfe2e8;
}

.receipt-reference-row span,
.receipt-reference-row strong {
  display: block;
}

.receipt-reference-row span {
  color: #707687;
  font-size: 0.78rem;
}

.receipt-reference-row strong {
  margin-top: 0.3rem;
  color: var(--app-navy);
  font-size: 0.95rem;
}

.statement-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem 1.5rem 1rem;
  text-align: center;
}

.statement-signatures span {
  color: #4e5360;
  font-size: 0.82rem;
}

.statement-signatures i {
  display: block;
  height: 1px;
  margin-top: 2.5rem;
  background: #8e939e;
}

@media (max-width: 575.98px) {
  .receipt-reference-row,
  .statement-signatures {
    grid-template-columns: 1fr;
  }

  .receipt-reference-row > div {
    padding: 0.9rem 1.25rem;
  }

  .receipt-reference-row > div + div {
    border-inline-start: 0;
    border-top: 1px solid #dfe2e8;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  html,
  body {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #000 !important;
    background: #fff !important;
    font-size: 12pt !important;
    print-color-adjust: economy;
    -webkit-print-color-adjust: economy;
  }

  .app-content,
  .content-container,
  main,
  .module-page,
  .print-page,
  .statement-page,
  .payroll-details-page,
  .centralized-report,
  .professional-report,
  .report-card,
  .official-receipt,
  .expense-voucher {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    zoom: 1 !important;
    color: #000 !important;
    background: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .official-receipt,
  .expense-voucher {
    min-height: 273mm !important;
  }

  .statement-page {
    min-height: 273mm;
  }

  .app-topbar,
  .app-sidebar,
  .app-footer,
  nav,
  .navbar,
  .sidebar-toggle,
  .page-header.no-print,
  .no-print,
  .filter-card,
  .page-actions,
  .table-actions,
  .receipt-actions,
  .voucher-actions,
  button {
    display: none !important;
  }

  .print-header,
  .print-brand-header {
    display: grid !important;
    grid-template-columns: 24mm minmax(0, 1fr) 34mm;
    align-items: center;
    gap: 5mm;
    width: 100% !important;
    min-height: 30mm;
    padding: 0 0 6mm !important;
    margin: 0 0 7mm !important;
    color: #000 !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1.5px solid #000 !important;
    break-inside: avoid;
  }

  .print-logo,
  .print-brand-logo,
  .receipt-school-logo {
    width: 22mm !important;
    height: 22mm !important;
    object-fit: contain;
  }

  .print-title,
  .print-brand-copy {
    text-align: center;
  }

  .print-brand-copy span {
    font-size: 9pt !important;
  }

  .print-brand-copy h2 {
    margin: 1mm 0 !important;
    color: #000 !important;
    font-size: 18pt !important;
    line-height: 1.35;
  }

  .print-brand-copy p {
    color: #000 !important;
    font-size: 14pt !important;
  }

  .print-brand-copy small,
  .print-date-block span,
  .print-date-block small {
    color: #000 !important;
    font-size: 8.5pt !important;
  }

  .print-date-block {
    min-width: 0 !important;
    padding: 3mm !important;
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
  }

  .print-date-block strong {
    color: #000 !important;
    font-size: 9pt !important;
  }

  .print-section,
  .statement-student-card,
  .financial-summary-card,
  .data-table-card,
  .receipt-reference-row,
  .receipt-information,
  .receipt-amount-panel,
  .voucher-reference-row,
  .voucher-amount,
  .voucher-details {
    break-inside: avoid;
  }

  .statement-student-card {
    width: 100% !important;
    margin-bottom: 5mm !important;
    padding: 5mm !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
  }

  .financial-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4mm !important;
    width: 100% !important;
    margin-bottom: 6mm !important;
  }

  .financial-summary-card {
    min-height: 0 !important;
    padding: 4mm !important;
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
  }

  .financial-summary-card *,
  .statement-student-card *,
  .receipt-information *,
  .receipt-reference-row *,
  .voucher-reference-row *,
  .voucher-details *,
  .voucher-amount * {
    color: #000 !important;
  }

  .financial-card-icon,
  .profile-avatar,
  .receipt-brand-bar {
    display: none !important;
  }

  .data-table-card,
  .statement-table-card,
  .report-table-section {
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
  }

  .data-table-header {
    padding: 4mm !important;
    color: #000 !important;
    background: #fff !important;
    border-bottom: 1px solid #000 !important;
  }

  .data-table-header h2 {
    color: #000 !important;
    font-size: 13pt !important;
  }

  .data-table-header p {
    color: #000 !important;
    font-size: 9pt !important;
  }

  .table-responsive {
    width: 100% !important;
    overflow: visible !important;
  }

  .print-table,
  .module-table,
  .report-table,
  .table {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: #000 !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    font-size: 10.5pt !important;
  }

  .print-table th,
  .print-table td,
  .module-table th,
  .module-table td,
  .report-table th,
  .report-table td,
  .table th,
  .table td {
    padding: 3mm 2.5mm !important;
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #000 !important;
    font-size: 10.5pt !important;
    line-height: 1.45 !important;
    white-space: normal !important;
  }

  .receipt-reference-row,
  .voucher-reference-row {
    width: 100%;
    margin-bottom: 6mm;
    border: 1px solid #000 !important;
  }

  .receipt-reference-row > div,
  .voucher-reference-row > div {
    padding: 5mm !important;
  }

  .receipt-reference-row > div + div,
  .voucher-reference-row > div + div {
    border-inline-start: 1px solid #000 !important;
  }

  .receipt-amount-panel,
  .voucher-amount {
    margin: 0 0 7mm !important;
    padding: 7mm !important;
    color: #000 !important;
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
  }

  .receipt-amount-panel strong,
  .voucher-amount strong {
    color: #000 !important;
    font-size: 24pt !important;
  }

  .receipt-information,
  .voucher-details {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #000 !important;
  }

  .receipt-information > div,
  .voucher-details > div {
    min-height: 20mm;
    padding: 5mm !important;
    border-color: #000 !important;
  }

  .receipt-information span,
  .voucher-details span {
    font-size: 9pt !important;
  }

  .receipt-information strong,
  .voucher-details strong {
    font-size: 11pt !important;
  }

  .official-receipt-footer,
  .voucher-signatures,
  .statement-signatures {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12mm !important;
    width: 100% !important;
    padding: 18mm 0 0 !important;
    color: #000 !important;
    background: #fff !important;
    break-inside: avoid;
  }

  .official-receipt-footer {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .official-receipt-footer p {
    display: none !important;
  }

  .official-receipt-footer div,
  .voucher-signatures span,
  .statement-signatures span {
    color: #000 !important;
    font-size: 10pt !important;
  }

  .official-receipt-footer i,
  .voucher-signatures i,
  .statement-signatures i {
    margin-top: 14mm !important;
    background: #000 !important;
  }
}

/* Global typography and readability */
html {
  font-size: 16px;
}

body {
  font-size: 1rem;
  line-height: 1.65;
}

.brand-copy strong {
  font-size: 1.05rem;
}

.brand-copy small {
  font-size: 0.76rem;
}

.nav-group-toggle {
  min-height: 46px;
  font-size: 0.92rem;
}

.sidebar-link {
  min-height: 40px;
  padding-block: 0.55rem;
  font-size: 0.88rem;
}

.topbar-eyebrow {
  font-size: 0.78rem;
}

.topbar-page strong {
  font-size: 1.08rem;
}

.user-details strong {
  font-size: 0.9rem;
}

.user-details span,
.logout-button,
.sidebar-toggle {
  font-size: 0.78rem;
}

.app-footer {
  font-size: 0.82rem;
}

.btn {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.btn-sm {
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
}

.form-label,
.form-section-card .form-label {
  font-size: 0.88rem;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 44px;
  font-size: 0.93rem;
}

.form-text,
.form-hint,
.text-danger {
  font-size: 0.78rem;
}

.table > :not(caption) > * > * {
  padding: 0.9rem 0.85rem;
}

.table,
.module-table tbody td {
  font-size: 0.86rem;
}

.table thead th,
.table-light th,
.module-table thead th {
  padding: 0.88rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.badge,
.gender-badge,
.status-badge,
.section-chip,
.payment-method-badge {
  font-size: 0.74rem;
}

.table-actions .btn {
  padding: 0.38rem 0.58rem;
  font-size: 0.74rem;
}

.welcome-kicker {
  font-size: 0.84rem;
}

.welcome-copy h1 {
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
}

.welcome-copy p {
  font-size: 0.98rem;
}

.welcome-year span {
  font-size: 0.8rem;
}

.welcome-year strong {
  font-size: 1.1rem;
}

.summary-copy small {
  font-size: 0.82rem;
}

.summary-copy strong {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.summary-copy em {
  font-size: 0.78rem;
}

.section-kicker {
  font-size: 0.78rem;
}

.panel-heading h2 {
  font-size: 1.08rem;
}

.panel-heading > a {
  font-size: 0.82rem;
}

.dashboard-quick-link strong {
  font-size: 0.9rem;
}

.dashboard-quick-link small {
  font-size: 0.75rem;
}

.financial-overview-card small,
.compact-metric small,
.finance-metric small,
.payroll-item small,
.student-total div > span,
.school-status-panel small,
.school-status-panel div > span {
  font-size: 0.76rem;
}

.financial-overview-card strong {
  font-size: 1.35rem;
}

.compact-metric strong {
  font-size: 1.42rem;
}

.finance-metric strong {
  font-size: 1.28rem;
}

.payroll-item strong {
  font-size: 1.2rem;
}

.payroll-item em {
  font-size: 0.72rem;
}

.student-links a,
.system-links a {
  font-size: 0.86rem;
}

.school-status-panel strong {
  font-size: 1rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 2vw, 2rem);
}

.page-header p {
  font-size: 0.92rem;
}

.page-eyebrow {
  font-size: 0.78rem;
}

.card-section-heading h2,
.form-section-heading h2,
.data-table-header h2 {
  font-size: 1.02rem;
}

.card-section-heading p,
.form-section-heading p,
.data-table-header p {
  font-size: 0.8rem;
}

.student-cell strong {
  font-size: 0.88rem;
}

.empty-state strong {
  font-size: 0.96rem;
}

.empty-state span:last-child {
  font-size: 0.8rem;
}

.form-submit-bar strong {
  font-size: 0.9rem;
}

.form-submit-bar span,
.generated-receipt-note {
  font-size: 0.76rem;
}

.profile-kicker,
.profile-meta span,
.detail-list dt,
.financial-highlight span,
.financial-highlight small,
.record-meta,
.confirmation-profile div > span,
.confirmation-profile small,
.status-choice span,
.confirmation-alert p,
.confirmation-details dt,
.statement-reference span,
.financial-summary-card div > span,
.financial-summary-card small,
.report-summary-card span,
.report-summary-card small {
  font-size: 0.75rem;
}

.student-profile-main h2 {
  font-size: 1.38rem;
}

.detail-list dd,
.notes-box,
.status-choice strong,
.confirmation-alert strong,
.confirmation-details dd,
.statement-reference strong {
  font-size: 0.87rem;
}

.financial-highlight strong {
  font-size: 1.8rem;
}

.financial-summary-card strong,
.report-summary-card strong {
  font-size: 1.6rem;
}

@media (max-width: 575.98px) {
  html {
    font-size: 15px;
  }

  .page-header h1 {
    font-size: 1.55rem;
  }

  .table,
  .module-table tbody td {
    font-size: 0.84rem;
  }

  .table thead th,
  .table-light th,
  .module-table thead th {
    font-size: 0.78rem;
  }
}

@media print {
  html,
  body {
    font-size: 12px;
  }
}

/* Expenses, employees, attendance, and payroll */
.single-summary-row {
  display: grid;
  grid-template-columns: minmax(280px, 430px);
}

.single-summary-row .report-summary-card {
  min-height: 120px;
}

.type-badge,
.period-chip,
.duration-value,
.view-only-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.expense-type-badge {
  color: #b46b17;
  background: #fff3e4;
}

.attendance-delay {
  color: #c27618;
  background: #fff4e4;
}

.attendance-absence {
  color: #c64255;
  background: #fff0f2;
}

.attendance-leave {
  color: #7651be;
  background: #f3edff;
}

.attendance-other {
  color: #327a99;
  background: #eaf6fb;
}

.period-chip {
  color: var(--app-indigo);
  background: #f0efff;
  font-variant-numeric: tabular-nums;
}

.duration-value {
  color: #a35f17;
  background: #fff5e8;
  font-variant-numeric: tabular-nums;
}

.view-only-label {
  color: var(--app-muted);
  background: #f2f3f6;
}

.payroll-draft {
  color: #6558c9;
  background: #efedff;
}

.compact-module-table {
  min-width: 720px;
}

.compact-empty {
  min-height: 120px;
}

.employee-avatar {
  color: #2f80ed;
  background: #eaf4ff;
}

.employee-profile-avatar {
  background: linear-gradient(145deg, #2f80ed, #6558df);
}

.employee-profile-hero {
  background:
    radial-gradient(circle at 8% 20%, rgba(47, 128, 237, 0.1), transparent 30%),
    #fff;
}

.module-info-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  color: #4b5470;
  background: #f1f4ff;
  border: 1px solid #dfe4fa;
  border-radius: 11px;
  font-size: 0.86rem;
}

.module-info-banner .app-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--app-indigo);
}

.module-info-banner strong,
.module-info-banner span {
  display: block;
}

.module-info-banner strong {
  color: var(--app-navy);
  font-size: 0.92rem;
}

.module-info-banner div > span {
  margin-top: 0.18rem;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.calculation-formula {
  margin-top: 1rem;
  padding: 0.85rem;
  color: #565d73;
  background: #fafafd;
  border: 1px dashed #d9dbe7;
  border-radius: 9px;
}

.calculation-formula span,
.calculation-formula strong {
  display: block;
}

.calculation-formula span {
  color: var(--app-muted);
  font-size: 0.76rem;
}

.calculation-formula strong {
  margin-top: 0.25rem;
  color: var(--app-navy);
  font-size: 0.88rem;
}

.net-salary-value {
  font-size: 0.94rem;
}

.professional-report {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e3eb;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(32, 35, 66, 0.06);
}

.report-document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 10% 15%, rgba(81, 70, 229, 0.08), transparent 32%),
    #fbfbfe;
  border-bottom: 1px solid #e8eaf1;
}

.report-document-header span,
.report-document-header h2,
.report-document-header p {
  display: block;
}

.report-document-header > div:first-child > span {
  color: var(--app-indigo);
  font-size: 0.76rem;
  font-weight: 800;
}

.report-document-header h2 {
  margin: 0.2rem 0;
  color: var(--app-navy);
  font-size: 1.4rem;
  font-weight: 800;
}

.report-document-header p {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.84rem;
}

.report-total-stamp {
  min-width: 180px;
  padding: 0.8rem 1rem;
  text-align: center;
  background: #fff;
  border: 1px solid #e1e3ee;
  border-radius: 10px;
}

.report-total-stamp span,
.report-total-stamp strong {
  display: block;
}

.report-total-stamp span {
  color: var(--app-muted);
  font-size: 0.76rem;
}

.report-total-stamp strong {
  margin-top: 0.2rem;
  color: var(--app-navy);
  font-size: 1.2rem;
}

.report-table {
  min-width: 720px;
}

.report-table thead th {
  padding: 0.9rem;
  color: #5a6176;
  background: #f7f8fc;
  border-color: #e7e9f1;
  font-size: 0.8rem;
  font-weight: 800;
}

.report-table tbody td,
.report-table tfoot th {
  padding: 0.9rem;
  border-color: #eceef4;
  font-size: 0.86rem;
}

.report-table tfoot th {
  color: #fff;
  background: #2f345f;
}

.report-document-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4rem;
  padding: 2.5rem 2rem 1.25rem;
  color: var(--app-muted);
  font-size: 0.76rem;
  text-align: center;
}

.report-document-footer span::after {
  display: block;
  height: 1px;
  margin-top: 2rem;
  background: #b8bcc8;
  content: "";
}

.report-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.report-summary-strip article {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e7e9f1;
  border-radius: 12px;
  box-shadow: var(--app-shadow);
}

.report-summary-strip span,
.report-summary-strip strong {
  display: block;
}

.report-summary-strip span {
  color: var(--app-muted);
  font-size: 0.78rem;
}

.report-summary-strip strong {
  margin-top: 0.3rem;
  color: var(--app-navy);
  font-size: 1.35rem;
}

.report-identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eceef4;
}

.payslip-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
}

.payroll-value-card {
  position: relative;
  padding: 1rem;
  overflow: hidden;
  background: #fafafd;
  border: 1px solid #e9ebf2;
  border-radius: 11px;
}

.payroll-value-card::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  content: "";
}

.payroll-value-card.base-value::before { background: var(--app-indigo); }
.payroll-value-card.hours-value::before { background: var(--app-orange); }
.payroll-value-card.deduction-value::before { background: var(--app-red); }
.payroll-value-card.net-value::before { background: var(--app-green); }

.payroll-value-card span,
.payroll-value-card strong,
.payroll-value-card small {
  display: block;
}

.payroll-value-card span,
.payroll-value-card small {
  color: var(--app-muted);
  font-size: 0.76rem;
}

.payroll-value-card strong {
  margin: 0.28rem 0;
  color: var(--app-navy);
  font-size: 1.35rem;
}

.report-table-section {
  margin: 0 1.5rem;
  overflow: hidden;
  border: 1px solid #e7e9f1;
  border-radius: 11px;
}

.document-status-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin: 1.25rem 1.5rem 0;
  padding: 0.85rem;
  border-radius: 9px;
  font-size: 0.82rem;
}

.approved-note {
  color: #176d58;
  background: #eaf8f3;
  border: 1px solid #cdeee3;
}

.cancelled-note {
  color: #9f3949;
  background: #fff1f3;
  border: 1px solid #f4d4d9;
}

@media (max-width: 991.98px) {
  .payslip-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .single-summary-row,
  .report-summary-strip {
    grid-template-columns: 1fr;
  }

  .report-document-header,
  .report-identity-row {
    align-items: stretch;
    flex-direction: column;
  }

  .report-total-stamp {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .payslip-summary-grid {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }

  .report-document-header,
  .report-identity-row {
    padding: 1rem;
  }

  .report-table-section {
    margin: 0 0.9rem;
  }

  .report-document-footer {
    gap: 1.5rem;
    padding-inline: 1rem;
  }
}

@media print {
  .professional-report {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
  }

  .report-document-header,
  .payroll-value-card,
  .report-total-stamp,
  .report-table tfoot th {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .report-document-header {
    padding: 12px;
  }

  .report-table,
  .compact-module-table {
    min-width: 0;
  }

  .report-summary-strip {
    display: none;
  }

  .landscape-report {
    width: 100%;
  }

  .landscape-report .report-table th,
  .landscape-report .report-table td {
    padding: 6px;
    font-size: 10px;
  }

  .payslip-summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Reports and administration */
.school-settings-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #292e5b, #5146e5);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(45, 49, 101, 0.18);
}

.school-settings-hero .profile-avatar {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.school-settings-hero .profile-avatar .app-icon {
  width: 28px;
  height: 28px;
}

.school-settings-hero > div {
  flex: 1;
}

.school-settings-hero span,
.school-settings-hero h2,
.school-settings-hero p {
  color: #fff;
}

.school-settings-hero > div > span,
.school-settings-hero p {
  color: #d9dcf2;
  font-size: 0.8rem;
}

.school-settings-hero h2 {
  margin: 0.2rem 0;
  font-size: 1.35rem;
}

.school-settings-hero p {
  margin: 0;
}

.order-chip,
.role-badge,
.audit-action-badge,
.entity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.order-chip {
  min-width: 34px;
  color: var(--app-indigo);
  background: #efedff;
}

.role-admin { color: #6c46bd; background: #f2ebff; }
.role-viewer { color: #32749a; background: #eaf5fb; }
.audit-action-badge { color: #6558c9; background: #efedff; }
.entity-badge { color: #37728d; background: #edf6fa; }

.username-code {
  direction: ltr;
  color: #40465d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}

.user-avatar-cell {
  color: #7651be;
  background: #f2ebff;
}

.user-profile-avatar {
  background: linear-gradient(145deg, #7651be, #5146e5);
}

.module-warning {
  padding: 0.85rem 1rem;
  color: #875f19;
  background: #fff8e9;
  border: 1px solid #f1dfb8;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.7;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.export-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 210px;
  padding: 1.15rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: var(--app-shadow);
}

.export-card::after {
  position: absolute;
  inset-inline-end: -28px;
  inset-block-end: -32px;
  width: 100px;
  height: 100px;
  background: currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.055;
}

.export-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: currentColor;
  border-radius: 12px;
}

.export-icon .app-icon {
  width: 23px;
  height: 23px;
  color: #fff;
}

.export-card h2 {
  margin: 0;
  font-size: 1rem;
}

.export-card p {
  margin: 0.3rem 0 0;
  color: var(--app-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.export-card .btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.export-indigo { color: var(--app-indigo); }
.export-green { color: var(--app-green); }
.export-red { color: var(--app-red); }
.export-blue { color: var(--app-blue); }
.export-orange { color: var(--app-orange); }
.export-purple { color: var(--app-purple); }

.audit-table {
  min-width: 1180px;
}

.audit-time {
  direction: ltr;
  color: #596078;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.audit-metadata-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.audit-metadata-grid article {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: var(--app-shadow);
}

.audit-metadata-grid span,
.audit-metadata-grid strong,
.audit-metadata-grid small {
  display: block;
}

.audit-metadata-grid article > span,
.audit-metadata-grid small {
  color: var(--app-muted);
  font-size: 0.75rem;
}

.audit-metadata-grid strong {
  margin-top: 0.28rem;
  color: var(--app-navy);
  font-size: 0.88rem;
}

.audit-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.audit-values-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: var(--app-shadow);
}

.audit-values-card header {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 800;
}

.old-values header { color: #a35f17; background: #fff6e9; }
.new-values header { color: #176d58; background: #eaf8f3; }

.audit-values-card pre {
  max-height: 480px;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  color: #31364d;
  background: #fafafd;
  font-size: 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.report-category {
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: var(--app-shadow);
}

.report-category-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.report-category-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.report-category-heading p {
  margin: 0.18rem 0 0;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.reports-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.report-navigation-card {
  display: flex;
  flex-direction: column;
  min-height: 160px;
  padding: 1rem;
  color: var(--app-text);
  background: #fafafd;
  border: 1px solid #eceef4;
  border-radius: 11px;
  transition: 0.16s ease;
}

.report-navigation-card:hover {
  color: var(--app-text);
  background: #fff;
  border-color: #d5d1ff;
  box-shadow: 0 8px 20px rgba(45, 49, 86, 0.07);
  transform: translateY(-2px);
}

.report-navigation-card h3 {
  margin: 0;
  font-size: 0.96rem;
}

.report-navigation-card p {
  margin: 0.45rem 0;
  color: var(--app-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.report-navigation-card span {
  margin-top: auto;
  color: var(--app-indigo);
  font-size: 0.82rem;
  font-weight: 800;
}

.featured-report-card {
  color: #fff;
  background: linear-gradient(135deg, #292e5b, #5146e5);
  border: 0;
}

.featured-report-card h3,
.featured-report-card span {
  color: #fff;
}

.featured-report-card p {
  color: #dfe0f3;
}

.centralized-report .filter-card {
  padding: 1.15rem;
}

.centralized-report .report-card > .card-body > .text-center {
  padding: 1rem;
  background: #fafafd;
  border-bottom: 1px solid #eceef4;
}

.centralized-report .report-card table {
  min-width: 760px;
}

.financial-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.financial-report-metrics > div {
  width: auto;
}

.financial-report-metrics > div > div {
  height: 100%;
  background: #fafafd;
  border-color: #e8eaf1 !important;
  border-radius: 11px !important;
}

.financial-report-metrics small {
  color: var(--app-muted);
  font-size: 0.78rem;
}

.financial-report-metrics .h5 {
  margin: 0.35rem 0 0;
  color: var(--app-navy);
  font-size: 1.3rem;
  font-weight: 800;
}

.financial-breakdown-card {
  height: 100%;
  padding: 0.9rem;
  background: #fafafd;
  border: 1px solid #e8eaf1;
  border-radius: 11px;
}

.financial-breakdown-card h3 {
  margin: 0 0 0.75rem;
  color: var(--app-navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.financial-breakdown-card .table {
  min-width: 340px;
  background: #fff;
}

@media (max-width: 1199.98px) {
  .export-grid,
  .audit-metadata-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .financial-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .reports-card-grid,
  .export-grid,
  .audit-metadata-grid,
  .audit-values-grid,
  .financial-report-metrics {
    grid-template-columns: 1fr;
  }

  .school-settings-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .centralized-report .report-card > .card-body {
    padding: 0;
  }

  .centralized-report .report-card table {
    min-width: 0;
  }

  .financial-report-metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Final cross-system consistency */
.page-header > .btn,
.page-header > a,
.page-actions > .btn,
.page-actions > a,
.page-actions > form > .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-actions > form {
  display: flex;
  margin: 0;
}

.filter-card form {
  align-items: end;
}

.filter-card .form-label {
  min-height: 1.45rem;
  display: flex;
  align-items: flex-end;
}

.filter-card .btn {
  min-height: 44px;
}

.filter-card .filter-actions,
.filter-card form > [class*="col-"]:has(> .btn) {
  align-items: center;
}

.data-table-card .table-responsive,
.professional-report .table-responsive {
  width: 100%;
}

.data-table-card .table,
.professional-report .table {
  margin-bottom: 0;
}

.table-actions > form {
  display: inline-flex;
  margin: 0;
}

.table-actions .btn {
  min-height: 32px;
}

.status-badge,
.gender-badge,
.payment-method-badge,
.type-badge,
.role-badge,
.audit-action-badge,
.entity-badge {
  line-height: 1.25;
}

.form-section-card .text-danger {
  display: block;
  margin-top: 0.3rem;
}

.form-section-card .form-check {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-submit-bar .btn {
  min-height: 42px;
}

.report-summary-strip {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.report-summary-strip article {
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.report-summary-card,
.financial-summary-card,
.summary-card {
  font-variant-numeric: tabular-nums;
}

.centralized-report .professional-report {
  min-width: 0;
}

.centralized-report .professional-report .table th {
  color: #596078;
  background: #f7f8fc;
  font-weight: 800;
  white-space: nowrap;
}

.centralized-report .professional-report .table td {
  border-color: #eceef4;
  vertical-align: middle;
}

.centralized-report .professional-report .table tfoot th {
  color: #fff;
  background: #2f345f;
}

.centralized-report .professional-report .card-body {
  min-width: 0;
}

@media (max-width: 767.98px) {
  .page-actions {
    width: 100%;
    justify-content: stretch;
  }

  .page-actions > .btn,
  .page-actions > a,
  .page-actions > form {
    flex: 1 1 auto;
  }

  .page-actions > form > .btn {
    width: 100%;
  }

  .filter-card form > [class*="col-"]:has(> .btn),
  .filter-card .filter-actions {
    width: 100%;
  }

  .filter-card form > [class*="col-"] > .btn,
  .filter-card .filter-actions .btn,
  .filter-card .filter-actions a {
    flex: 1 1 auto;
  }

  .form-submit-bar > div:last-child {
    width: 100%;
  }
}

@media print {
  .table-responsive {
    overflow: visible !important;
  }

  .professional-report,
  .report-card,
  .print-page {
    color: #202342;
    background: #fff !important;
  }

  .professional-report .table th,
  .professional-report .table td {
    break-inside: avoid;
  }

  .report-summary-strip.no-print,
  .filter-card.no-print,
  .page-header.no-print {
    display: none !important;
  }
}

/* Branding and printable documents */
.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.brand-logo-fallback {
  display: none;
}

.login-brand {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--app-navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.login-brand img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(81, 70, 229, 0.2);
}

.print-brand-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fbfbfe;
  border-bottom: 1px solid #e4e6ee;
}

.print-brand-logo,
.receipt-school-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.print-brand-copy {
  flex: 1;
  min-width: 0;
}

.print-brand-copy span,
.print-brand-copy h2,
.print-brand-copy p,
.print-brand-copy small,
.print-date-block span,
.print-date-block strong,
.print-date-block small {
  display: block;
}

.print-brand-copy span {
  color: var(--app-indigo);
  font-size: 0.76rem;
  font-weight: 800;
}

.print-brand-copy h2 {
  margin: 0.15rem 0;
  color: var(--app-navy);
  font-size: 1.2rem;
  font-weight: 800;
}

.print-brand-copy p {
  margin: 0;
  color: #4d546c;
  font-size: 0.9rem;
  font-weight: 700;
}

.print-brand-copy small,
.print-date-block span,
.print-date-block small {
  color: var(--app-muted);
  font-size: 0.72rem;
}

.print-date-block {
  min-width: 128px;
  padding: 0.65rem 0.8rem;
  text-align: center;
  background: #fff;
  border: 1px solid #e0e3ec;
  border-radius: 9px;
}

.print-date-block strong {
  margin: 0.15rem 0;
  color: var(--app-navy);
  direction: ltr;
  font-size: 0.86rem;
}

.document-status-strip {
  display: flex;
  justify-content: flex-end;
  padding: 0.8rem 1.5rem 0;
}

.voucher-body {
  min-height: 100vh;
  padding: 2rem 1rem;
  color: #202124;
  background: #f3f5f9;
}

.expense-voucher {
  max-width: 820px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe2e8;
  border-radius: 6px;
  box-shadow: 0 18px 45px rgba(32, 35, 66, 0.1);
}

.voucher-reference-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #dfe2e8;
}

.voucher-reference-row > div,
.voucher-details > div {
  padding: 1rem 1.5rem;
}

.voucher-reference-row > div + div {
  border-inline-start: 1px solid #dfe2e8;
}

.voucher-reference-row span,
.voucher-reference-row strong,
.voucher-details span,
.voucher-details strong,
.voucher-amount span,
.voucher-amount strong,
.voucher-amount small {
  display: block;
}

.voucher-reference-row span,
.voucher-details span,
.voucher-amount span,
.voucher-amount small {
  color: #656b78;
  font-size: 0.76rem;
}

.voucher-reference-row strong,
.voucher-details strong {
  margin-top: 0.3rem;
  color: #202124;
  font-size: 0.94rem;
}

.document-code {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.voucher-amount {
  margin: 1.4rem 1.5rem;
  padding: 1.2rem;
  text-align: center;
  border: 2px solid #262a35;
}

.voucher-amount strong {
  margin: 0.15rem 0;
  color: #111;
  font-size: 2rem;
}

.voucher-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 1.5rem;
  border: 1px solid #dfe2e8;
}

.voucher-details > div {
  border-bottom: 1px solid #dfe2e8;
}

.voucher-details > div:nth-child(even) {
  border-inline-start: 1px solid #dfe2e8;
}

.voucher-details .voucher-notes {
  grid-column: 1 / -1;
  min-height: 96px;
  border-bottom: 0;
  border-inline-start: 0;
}

.voucher-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
}

.voucher-signatures span {
  color: #4e5360;
  font-size: 0.8rem;
}

.voucher-signatures i {
  display: block;
  height: 1px;
  margin-top: 2.4rem;
  background: #8e939e;
}

.voucher-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem;
  background: #f8f9fb;
  border-top: 1px solid #e1e3e9;
}

@media (max-width: 575.98px) {
  .auth-content {
    padding: 0.75rem;
  }

  .auth-content > .row {
    margin-top: 0 !important;
  }

  .login-brand img {
    width: 64px;
    height: 64px;
  }

  .print-brand-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1rem;
  }

  .print-date-block {
    width: 100%;
  }

  .voucher-body {
    padding: 0;
  }

  .expense-voucher {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .voucher-reference-row,
  .voucher-details,
  .voucher-signatures {
    grid-template-columns: 1fr;
  }

  .voucher-reference-row > div + div,
  .voucher-details > div:nth-child(even) {
    border-inline-start: 0;
  }

  .voucher-reference-row > div + div {
    border-top: 1px solid #dfe2e8;
  }

  .voucher-details .voucher-notes {
    grid-column: auto;
  }

  .voucher-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  body,
  .receipt-body,
  .voucher-body {
    padding: 0 !important;
    color: #000 !important;
    background: #fff !important;
  }

  .app-topbar,
  .app-sidebar,
  .app-footer,
  .sidebar-toggle,
  .no-print,
  .page-actions,
  .filter-card,
  .voucher-actions,
  .receipt-actions,
  button {
    display: none !important;
  }

  .print-brand-header {
    padding: 8mm 0 5mm;
    color: #000;
    background: #fff !important;
    border-bottom: 1px solid #000;
    break-inside: avoid;
  }

  .print-brand-logo,
  .receipt-school-logo {
    width: 18mm;
    height: 18mm;
  }

  .print-brand-copy span,
  .print-brand-copy h2,
  .print-brand-copy p,
  .print-brand-copy small,
  .print-date-block span,
  .print-date-block strong,
  .print-date-block small {
    color: #000 !important;
  }

  .print-date-block {
    background: #fff !important;
    border-color: #000;
  }

  .expense-voucher,
  .official-receipt {
    max-width: none;
    margin: 0;
    border: 0;
    box-shadow: none !important;
  }

  .voucher-reference-row,
  .voucher-details,
  .voucher-reference-row > div + div,
  .voucher-details > div,
  .voucher-details > div:nth-child(even) {
    border-color: #000;
  }

  .voucher-amount {
    border-color: #000;
  }

  .voucher-amount *,
  .voucher-reference-row *,
  .voucher-details *,
  .voucher-signatures * {
    color: #000 !important;
  }

  .professional-report,
  .report-card,
  .print-page {
    box-shadow: none !important;
  }

  @page {
    size: A4;
    margin: 12mm;
  }
}

/* Final Chrome print alignment override */
@media print {
  .app-body,
  .app-content,
  .content-container,
  body > main,
  main[role="main"],
  .module-page {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    padding-inline: 0 !important;
    transform: none !important;
    translate: none !important;
  }

  .app-content {
    min-height: 0 !important;
    padding-top: 0 !important;
  }

  .content-container {
    flex: none !important;
  }

  .print-page,
  .official-receipt.print-page,
  .statement-page.print-page,
  .expense-voucher.print-page {
    position: static !important;
    inset: auto !important;
    float: none !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 186mm !important;
    min-width: 186mm !important;
    max-width: 186mm !important;
    margin: 0 auto !important;
    margin-inline: auto !important;
    padding: 0 !important;
    transform: none !important;
    translate: none !important;
  }

  .app-topbar,
  .app-sidebar,
  .app-footer,
  .sidebar-toggle,
  .navbar,
  .no-print,
  .page-actions,
  .filter-card,
  .table-actions,
  .receipt-actions,
  .voucher-actions {
    display: none !important;
  }
}
