* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--color-bg-accent), transparent 60%),
    var(--color-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

.topbar {
  background: linear-gradient(120deg, var(--color-primary-strong), #144b7a);
  color: var(--color-primary-contrast);
  padding: var(--space-3) var(--space-5);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.2px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 4px;
}

nav {
  margin-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

nav a {
  color: var(--color-nav-link);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(216, 255, 251, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(216, 255, 251, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(7, 24, 44, 0.18);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  color: var(--color-nav-link);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(216, 255, 251, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease;
}

.nav-dropdown summary::after {
  content: '▾';
  font-size: 10px;
  line-height: 1;
  opacity: 0.95;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(216, 255, 251, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(7, 24, 44, 0.18);
}

.nav-dropdown[open] summary {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(216, 255, 251, 0.65);
}

.nav-dropdown[open] summary::after {
  content: '▴';
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  z-index: 20;
  display: none;
}

.nav-dropdown[open] .nav-submenu {
  display: block;
}

.nav-submenu a {
  display: block;
  color: var(--color-text);
  border: 0;
  border-radius: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  text-align: left;
}

.nav-submenu a:hover {
  background: var(--color-surface-soft);
  color: var(--color-primary-strong);
  transform: translateX(2px);
}

.container {
  max-width: var(--container-max);
  margin: var(--space-5) auto;
  padding: 0 var(--space-3);
  width: 100%;
  flex: 1 0 auto;
}

.site-footer {
  margin-top: var(--space-4);
  background: linear-gradient(120deg, var(--color-primary-strong), #144b7a) !important;
  color: var(--color-primary-contrast);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  flex-shrink: 0;
}

.site-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 14px var(--space-3);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.site-footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 8px;
  text-decoration: none;
}

.site-footer-logo {
  display: block;
  width: min(270px, 76vw);
  height: auto;
}

.site-footer-inner p {
  margin: 0;
}

.site-footer-inner p + p {
  margin-top: 2px;
}

.back-to-top {
  -webkit-appearance: none;
  appearance: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  border: 1px solid rgba(216, 255, 251, 0.35);
  border-radius: 50%;
  background: linear-gradient(120deg, var(--color-primary-strong), #144b7a);
  color: var(--color-primary-contrast);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 18px rgba(7, 24, 44, 0.36);
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  box-shadow: 0 10px 22px rgba(7, 24, 44, 0.48);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.narrow {
  max-width: 460px;
  margin: 30px auto;
}

.landing-splash {
  max-width: 860px;
  margin: 34px auto 20px;
  padding: 34px 28px;
  text-align: center;
}

.landing-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
}

.landing-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f2a47;
}

.landing-subtitle {
  margin: 12px auto 0;
  max-width: 700px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  color: #1c3b5f;
}

.landing-cliparts {
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  max-width: 760px;
}

.landing-clipart-card {
  margin: 0;
  padding: 14px;
  border: 1px solid #ccdae9;
  border-radius: 20px;
  background: linear-gradient(160deg, #f9fcff, #eef5fb);
  width: 100%;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.landing-clipart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(17, 51, 84, 0.14);
  border-color: #9fc3df;
}

.landing-clipart-img {
  width: 100%;
  max-width: 290px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.landing-clipart-card span {
  display: block;
  margin-top: 8px;
  font-weight: 800;
  color: #1b3d63;
}

.landing-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.landing-actions .btn {
  min-width: 220px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  padding: 12px 20px;
}

.landing-btn-guru {
  background: linear-gradient(120deg, #0f7a83, #1c82b4);
}

.landing-btn-murid {
  background: linear-gradient(120deg, #1f7a3a, #34a853);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-2);
  align-items: end;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
}

.stat {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.stat h3 {
  margin: 0;
  font-size: 30px;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #bfd0e2;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}

button,
.btn {
  background: linear-gradient(135deg, var(--color-primary), #1579a7);
  color: var(--color-primary-contrast);
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 110px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.row-actions-center {
  justify-content: center;
}

.inline-form {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  flex-wrap: wrap;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.chip {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--color-surface-soft);
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--color-border);
}

th,
td {
  border-bottom: 1px solid var(--color-border);
  padding: 10px;
}

td {
  text-align: center;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--color-surface-soft);
  font-weight: 700;
  text-align: center;
}

th .sort-btn {
  all: unset;
  cursor: pointer;
  display: inline-block;
  font-weight: 700;
}

th .sort-btn:hover {
  color: var(--color-primary-strong);
}

th.uppbp-name-col-header {
  text-align: center !important;
}

td.uppbp-name-col-cell {
  text-align: left !important;
}

th.uppbp-auto-bil-header,
td.uppbp-auto-bil-cell {
  text-align: center !important;
  width: 56px;
  min-width: 56px;
}

.flash {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.flash.ok {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.flash.error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.scores-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-3);
}

.btn-save-scores {
  min-width: 220px;
  padding: 14px 24px;
  font-size: 16px;
}

.save-confirm {
  margin: var(--space-2) 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--color-success);
}

.scores-table {
  table-layout: fixed;
}

.scores-table .scores-col-bil {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  text-align: center;
}

.scores-table .scores-col-name {
  width: 40%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
  vertical-align: middle;
}

.scores-table .scores-col-markah {
  width: 24%;
  text-align: center;
}

.scores-table .scores-col-th,
.scores-table .scores-col-ta,
.scores-table .scores-col-gred {
  width: 10%;
  text-align: center;
}

.scores-table input[type="number"] {
  width: 100%;
}

.scores-ta-note {
  margin: 8px 0 12px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  background: #fff9db;
  border: 1px solid #f2e29a;
  border-radius: 12px;
  color: #6e5b1a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.hint {
  color: var(--color-text-muted);
}

.announcement {
  background: #fff6d8;
  border: 1px solid #f1d98a;
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}

.site-logo-preview {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--color-border);
}

.table-wrap {
  overflow-x: auto;
}

.slip-print-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.slip-print-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.slip-print-school {
  margin: 0;
  font-size: 22px;
}

.slip-print-subtitle {
  margin: 4px 0 2px;
  font-weight: 700;
  color: var(--color-text);
}

.slip-print-meta {
  margin: 0;
  color: var(--color-text-muted);
}

.slip-cert-wrap {
  max-width: 980px;
  margin: 0 auto;
}

.slip-cert {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 24px;
}

.slip-cert-head {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  border-bottom: 2px solid #d7e2f0;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.slip-cert-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slip-cert-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.slip-cert-school {
  margin: 2px 0;
  font-size: 22px;
  line-height: 1.1;
}

.slip-cert-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #1b3558;
}

.slip-cert-main-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  color: #112846;
  text-align: left;
  text-transform: uppercase;
}

.slip-cert-school-name {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 800;
  color: #1c3556;
}

.slip-cert-generated {
  margin: 4px 0 0;
  font-size: 12px;
  color: #5b7392;
}

.slip-cert-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.slip-kv {
  border: 1px solid #d2dfef;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.slip-kv span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1f3f64;
  font-weight: 800;
}

.slip-kv strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.slip-kv-wide {
  grid-column: 1 / -1;
}

.slip-kv-wide strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slip-cert-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.slip-pill {
  border-radius: 999px;
  border: 1px solid #b8cae2;
  background: #f5f9ff;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.slip-pill span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1f3f64;
  font-weight: 800;
}

.slip-doc-title {
  margin: 8px 0 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #132a47;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.slip-pill strong {
  font-size: 15px;
}

.slip-result-table th,
.slip-result-table td {
  padding: 10px 12px;
}

.markah-value {
  color: #1266b3;
  font-weight: 800;
}

.grade-pill {
  display: inline-block;
  border-radius: 999px;
  min-width: 44px;
  text-align: center;
  padding: 4px 10px;
  font-weight: 800;
}

.grade-pill.is-pass {
  background: #e7f8ee;
  color: #0e6e36;
}

.grade-pill.is-fail {
  background: #fdeaea;
  color: #a42323;
}

.slip-cert-foot {
  margin-top: 18px;
  border-top: 1px solid #d7e2f0;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.sign-box {
  width: 46%;
  text-align: center;
  color: #3d5574;
}

.sign-box p {
  margin: 4px 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 25, 46, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: 0 14px 35px rgba(9, 22, 44, 0.2);
  padding: var(--space-4);
}

#semakModal .modal {
  width: min(680px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.modal-head h3 {
  margin: 0;
}

.btn-ghost {
  background: #ffffff;
  color: #123f69;
  border: 1px solid #86a9ca;
  box-shadow: 0 4px 10px rgba(20, 53, 87, 0.08);
}

.btn-ghost:hover {
  background: #e8f2ff;
  border-color: #5e87b0;
  color: #0f3457;
}

.modal-close {
  min-width: 88px;
}

.slip-preview-modal {
  width: min(860px, 100%);
  max-height: 86vh;
  overflow: auto;
}

.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.modal-actions {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-1);
  justify-content: flex-end;
}

.modal p {
  white-space: pre-line;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  background: var(--color-surface-soft);
  font-size: 12px;
  font-weight: 700;
}

.headcount-subject-cell {
  white-space: pre-line;
  min-width: 190px;
  line-height: 1.25;
  font-size: 13px;
}

@media (max-width: 768px) {
  .topbar {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: var(--space-3);
  }

  .brand h1 {
    font-size: 20px;
  }

  .container {
    margin: var(--space-4) auto;
    padding: 0 var(--space-2);
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  .card {
    padding: var(--space-3);
  }

  .landing-splash {
    margin: 8px auto 8px;
    padding: 14px 12px;
  }

  .landing-logo {
    width: 160px;
    height: 160px;
    margin-bottom: 8px;
  }

  .landing-title {
    font-size: 16px;
  }

  .landing-subtitle {
    font-size: 22px;
    line-height: 1.15;
    margin-top: 8px;
  }

  .landing-cliparts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    gap: 8px;
    margin-top: 12px;
  }

  .landing-clipart-card {
    padding: 8px;
    border-radius: 14px;
  }

  .landing-clipart-img {
    max-width: 120px;
  }

  .landing-clipart-card span {
    margin-top: 6px;
    font-size: 13px;
  }

  .landing-actions {
    gap: 10px;
  }

  .landing-actions .btn {
    width: 100%;
    max-width: 330px;
    min-width: 0;
  }

  nav a {
    font-size: 13px;
    padding: 7px 11px;
  }

  .nav-dropdown summary {
    font-size: 13px;
    padding: 7px 11px;
  }

  .nav-submenu {
    min-width: 190px;
  }

  .site-footer {
    background: linear-gradient(120deg, var(--color-primary-strong), #144b7a) !important;
    position: static;
    margin-top: var(--space-2);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: none;
  }

  .site-footer-inner {
    padding: 12px var(--space-2);
    font-size: 13px;
    line-height: 1.35;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 28px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .scores-table {
    display: table;
    white-space: normal;
  }

  .scores-table th,
  .scores-table td {
    padding: 6px;
  }

  .scores-table .scores-col-bil {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
  }

  .scores-table .scores-col-name {
    width: 38%;
    font-size: 13px;
    line-height: 1.15;
  }

  .scores-table .scores-col-markah {
    width: 24%;
  }

  .scores-table .scores-col-th,
  .scores-table .scores-col-ta,
  .scores-table .scores-col-gred {
    width: 12%;
  }

  .scores-table input[type="number"] {
    min-width: 72px;
    padding: 8px 8px;
    font-size: 13px;
  }

  .slip-cert {
    padding: 14px;
  }

  .slip-cert-head {
    flex-direction: column;
  }

  .slip-cert-exam {
    text-align: left;
  }

  .slip-cert-school {
    font-size: 18px;
  }

  .slip-cert-main-title {
    font-size: 24px;
  }

  .slip-cert-school-name {
    font-size: 20px;
  }

  .slip-cert-meta {
    grid-template-columns: 1fr;
  }

  .slip-cert-summary {
    grid-template-columns: 1fr;
  }

  .slip-cert-foot {
    flex-direction: column;
  }

  .sign-box {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-login .site-footer {
    position: static;
    box-shadow: none;
    margin-top: 6px;
  }

  .page-login .site-footer-inner {
    padding: 8px var(--space-2);
    font-size: 12px;
  }
}

.page-login .container {
  max-width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.page-login .landing-splash {
  width: min(860px, 100%);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-login .container {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .no-print,
  header,
  .site-footer,
  .announcement {
    display: none !important;
  }

  .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  #resultCard {
    border: 0;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    margin: 0;
  }

  .slip-cert {
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
    width: 100%;
    padding: 8mm 7mm;
    page-break-inside: avoid;
  }

  body {
    background: #fff !important;
  }

  .slip-cert-head {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 14px !important;
    border-bottom: 2px solid #d7e2f0 !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
  }

  .slip-cert-brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .slip-cert-logo {
    display: block !important;
    width: 82px !important;
    height: 82px !important;
  }

  .slip-cert-title {
    font-size: 16px !important;
  }

  .slip-cert-main-title {
    font-size: 26px !important;
    text-align: left !important;
  }

  .slip-cert-school-name {
    font-size: 20px !important;
  }

  .slip-doc-title {
    font-size: 22px !important;
  }

  .slip-cert-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .slip-kv-wide {
    grid-column: 1 / -1 !important;
  }

  .slip-cert-summary {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

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

  table {
    display: table !important;
    white-space: normal !important;
  }

  .slip-result-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .slip-result-table th,
  .slip-result-table td {
    padding: 7px 8px;
    border: 1px solid #c7d5e6;
    vertical-align: middle;
  }

  .slip-result-table th:first-child,
  .slip-result-table td:first-child {
    width: 58%;
  }

  .slip-result-table th:nth-child(2),
  .slip-result-table td:nth-child(2) {
    width: 17%;
    text-align: center;
  }

  .slip-result-table th:nth-child(3),
  .slip-result-table td:nth-child(3) {
    width: 25%;
    text-align: center;
  }

  .grade-pill {
    min-width: 38px;
    padding: 2px 8px;
    border: 1.5px solid currentColor;
    background: transparent !important;
    font-weight: 900;
    line-height: 1.15;
  }

  .grade-pill.is-pass {
    color: #106f39 !important;
  }

  .grade-pill.is-fail {
    color: #9f1f1f !important;
  }

  .markah-value {
    color: #124f8e !important;
    font-weight: 900 !important;
  }
}
