@font-face {
  font-family: Alexandria;
  src: url('./fonts/Alexandria-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #293f52;
  --navy-dark: #182e40;
  --blue: #00718a;
  --cyan: #0092ac;
  --ink: #243b4c;
  --muted: #506673;
  --line: #dce5e7;
  --soft: #f2f7f8;
  --brand-gold: #bc8d51;
  --brand-paper: #faf8f2;
  --shadow: 0 20px 55px #233e5020;
}

.brand-marks {
  display: inline-flex !important;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  background: #fff;
  border: 1px solid #dce5e7;
  border-radius: 12px;
}

.brand-marks img {
  display: block;
  width: var(--mark-size, 54px) !important;
  height: var(--mark-size, 54px) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  object-fit: contain;
}

.brand-marks .brand-school-logo {
  padding-inline-start: 8px !important;
  width: calc(var(--mark-size, 54px) + 8px) !important;
  border-inline-start: 1px solid #dce5e7;
}

.brand-copy strong, .brand-copy small { line-height: 1.65; }
.brand-copy small { white-space: normal; }

.page-shell {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 19rem 16rem at calc(50% + min(38vw, 470px)) 19rem, #7796a5, #3c5c70 52%, transparent 100%),
    linear-gradient(145deg, #0d2133, #152e41 60%, #1d4050);
}

.page-shell::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 29rem;
  inset-inline-start: -19rem;
  width: 35rem;
  aspect-ratio: 1;
  border: 1px solid #c6dbe51b;
  border-radius: 4rem;
  outline: 1px solid #c6dbe512;
  outline-offset: 1.25rem;
  transform: rotate(38deg);
  pointer-events: none;
}

.page-shell .topbar {
  display: flex;
  justify-content: space-between;
  min-height: 94px;
  gap: 18px;
  border-color: #d8ebf42b;
}

.topbar-logo-filters { position: absolute; }

.page-shell .topbar .brand-marks {
  --mark-size: 72px;
  padding: 0;
  background: transparent;
  border: 0;
}

.page-shell .topbar .brand-platform-logo { filter: brightness(1.8); }
.page-shell .topbar .brand-school-logo {
  width: var(--mark-size, 54px) !important;
  padding-inline-start: 0 !important;
  border-inline-start: 0;
  filter: url('#topbar-school-logo');
}

.page-shell .brand-copy strong { color: #f6f9fd; }
.page-shell .brand-copy small { color: #c4d9e5; }
.page-shell .top-login { color: #f6f9fd; border-color: #d8ebf452; }
.page-shell .top-login:hover { background: #d8ebf41a; }

.page-shell .hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5.1vw, 76px);
  align-items: center;
  min-height: 0;
  padding: clamp(38px, 6vw, 84px) 0 clamp(38px, 5vw, 72px);
}

.page-shell .hero-copy {
  padding: 0;
  color: #fff;
}

.hero-brand {
  display: grid;
  grid-template-columns: minmax(130px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}

.hero-emblem {
  width: min(100%, 236px);
  aspect-ratio: 1;
  justify-self: center;
  animation: emblem-enter 540ms ease-out both;
}

.hero-emblem img { width: 100%; height: 100%; display: block; object-fit: contain; }
.hero-brand-text .hero-wordmark {
  position: relative;
  width: min(100%, 322px);
  aspect-ratio: 658 / 320;
  margin: 0;
  overflow: hidden;
  clip-path: polygon(4% 0, 100% 0, 100% 100%, 0 100%, 0 46%, 4% 39%);
}

/* Frame the calligraphy from the full emblem, including its gold accents. */
.hero-wordmark img {
  position: absolute;
  width: 190.6%;
  max-width: none;
  height: auto;
  left: -40.6%;
  top: -10.6%;
  display: block;
  filter: brightness(2.35) saturate(.83);
}

/* The three areas cover the original dot, shadda, and pair of dots.
   The emblem mask keeps the original shapes and their transparent edges. */
.hero-wordmark::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#fff, #fff) 36.5% 20% / 9.5% 18.5% no-repeat,
    linear-gradient(#fff, #fff) 76.3% 11.1% / 16.6% 27% no-repeat,
    linear-gradient(#fff, #fff) 99% 99.7% / 16.8% 18.4% no-repeat;
  mask: url('./yassarnahu-1448.png') 44.8% 3.63% / 190.6% auto no-repeat;
}

.hero-brand-text p {
  color: #e1ebef;
  margin: 16px 0 0;
  max-width: 29ch;
  font-size: clamp(1.03rem, 1.5vw, 1.19rem);
  font-weight: 600;
  line-height: 1.85;
}

@keyframes emblem-enter {
  from { opacity: .65; transform: translateY(9px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-emblem { animation: none; }
}
.page-shell .login-wrap { padding: 0; scroll-margin-top: 14px; }
.page-shell .login-wrap::before { display: none; }
.page-shell .login-card { border: 1px solid #e6edf1; border-top: 3px solid var(--brand-gold); box-shadow: 0 24px 52px #08182760; background: #fff; }
.page-shell .login-icon { background: #edf6f6; color: var(--blue); }
.page-shell .input-box { border-color: var(--line); }
.page-shell .input-box:focus-within { border-color: var(--blue); }
.page-shell .submit-button { background: linear-gradient(120deg, var(--navy-dark), #275469); }
.page-shell .feature-strip {
  margin-bottom: 12px;
  background: #ffffff0a;
  border-color: #d8ebf42b;
  box-shadow: none;
}
.page-shell .feature-strip article + article { border-color: #d8ebf42b; }
.page-shell .feature-strip strong { color: #f6f9fd; }
.page-shell .feature-strip p, .page-shell footer { color: #c4d9e5; }
.page-shell .feature-icon { background: #d4ebf51a; color: #b8dcf2; }

.dashboard-shell { --ui-ink: var(--ink); --ui-muted: var(--muted); background: #f4f7f6; }
.dashboard-topbar { border-bottom-color: var(--line); }
.dashboard-shell .welcome-banner { background: linear-gradient(110deg, #e4f3f3, #f8f1e5); }
.dashboard-shell .welcome-banner .eyebrow { color: var(--blue); }
.dashboard-shell .solid-button, .report-preview-toolbar #report-print { background: linear-gradient(120deg, var(--navy-dark), #275469); }
.dashboard-shell .teal-button, .report-preview-toolbar .achievement-download { background: #006d79; }
.dashboard-shell .gold-button { color: #4a3216; background: #ebcb98; }
.dashboard-shell .admin-sidebar-title > span { background: #e7f4f4; color: #006d79; }

.report-identity, .progress-report-identity { --mark-size: 57px; }
.report-hero, .progress-report-hero, .report-champions .report-hero {
  background: linear-gradient(145deg, #f5f6ef, #e3eff1) !important;
  color: var(--ink) !important;
  border-bottom: 3px solid var(--brand-gold);
}
.report-hero h1, .report-hero p, .report-hero .brand-copy strong,
.report-hero .brand-copy small, .progress-report-hero .brand-copy strong,
.progress-report-hero .brand-copy small, .progress-report-title h1,
.progress-report-title p, .progress-report-score { color: var(--ink) !important; }
.report-hero .report-label, .report-hero .report-meta span { background: #fff; border-color: var(--line); color: var(--navy); }
.progress-report-title > span { background: #fff; color: var(--navy); }
.report-document .report-table thead th, .khairkom-teacher-sheet .nominee-report-table thead th {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.nominee-school { --mark-size: 76px; }
.nominee-report-header { background: linear-gradient(145deg, #f5f6ef, #e3eff1); border-color: var(--line); }
.khairkom-teacher-sheet { border-top-color: var(--navy); }
.achievement-pending { border-top-color: var(--brand-gold); }

@media (max-width: 900px) {
  .page-shell {
    background:
      radial-gradient(ellipse 17rem 14rem at calc(50% + 9rem) 12rem, #7796a5, #3c5c70 52%, transparent 100%),
      linear-gradient(145deg, #0d2133, #152e41 60%, #1d4050);
  }
  .page-shell .hero { grid-template-columns: minmax(0,1fr); gap: 32px; padding-block: 34px; }
  .page-shell .hero-copy { width: min(100%, 490px); margin-inline: auto; text-align: start; }
  .hero-brand-text p { margin-top: 12px; }
}

@media (max-width: 760px) {
  .brand, .report-identity, .progress-report-identity { --mark-size: 42px; }
  .brand-copy strong { font-size: .84rem; }
  .brand-copy small { font-size: .67rem; }
}

@media (max-width: 560px) {
  .page-shell {
    background:
      radial-gradient(ellipse 10rem 8rem at 50% 9rem, #7898a9, #3c5c70 53%, transparent 100%),
      linear-gradient(145deg, #0d2133, #152e41 60%, #1d4050);
  }
  .page-shell::before { opacity: .65; }
  .page-shell .hero { gap: 25px; padding-block: 20px 30px; }
  .page-shell .hero-copy { text-align: center; }
  .hero-brand { grid-template-columns: minmax(0,1fr); justify-items: center; gap: 7px; }
  .hero-emblem { width: 104px; }
  .hero-brand-text .hero-wordmark { width: min(100%, 197px); margin-inline: auto; }
  .hero-brand-text p { margin: 8px auto 0; font-size: .91rem; line-height: 1.75; }
  .page-shell .login-card { padding: 24px 21px; }
  .page-shell .topbar { min-height: 79px; }
  .page-shell .topbar .brand-marks { --mark-size: 56px; }
  .page-shell .top-login { display: none; }
}

@media print {
  .report-identity, .progress-report-identity { --mark-size: 13mm; }
  .report-champions .report-identity { --mark-size: 18mm; }
  .report-hero, .progress-report-hero { print-color-adjust: exact; }
}
