@font-face {
  font-family: Raleway;
  src: url('/fonts/Raleway.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
:root { --surface: #f7f7f7; --top-header-height: 89px; --header-red: #ca1720; --navy: #15264c; --subnav: #283e6b; --blue: #169ed4; }
* { box-sizing: border-box; }
body { margin: 0; color: #212529; background: var(--surface); font: 16px/1.5 Raleway, Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.top-header { position: relative; z-index: 5; width: 100%; height: var(--top-header-height); background: var(--header-red); color: #fff; }
.top-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; height: 100%; margin: 0 auto; padding: 4px 30px 0 29px; }
.top-header-brand { display: flex; align-items: center; gap: 22px; flex: 0 0 auto; }
.top-header-mark { display: block; width: 46px; height: 46px; flex: 0 0 auto; }
.top-header-identity { display: flex; flex-direction: column; min-width: 0; font-family: Arial, sans-serif; }
.top-header-identity strong { font-size: 28px; line-height: 33px; font-weight: 700; letter-spacing: .6px; }
.top-header-identity span { font-size: 18px; line-height: 23px; }
.top-header-controls { display: flex; align-items: center; gap: 22px; }
.header-control { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 55px; padding: 0 9px; border: 0; border-radius: 3px; background: #d75158; color: #fff; font-family: Arial, sans-serif; font-size: 14px; line-height: 17px; white-space: nowrap; cursor: default; }
.header-control svg { display: block; flex: 0 0 auto; width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-service { width: 149px; justify-content: flex-start; text-align: left; }
.header-service svg { width: 35px; height: 35px; }
.header-login { width: 122px; }
.header-icon { width: 53px; padding: 0; }
.shell { display: flex; width: 100%; max-width: 1200px; min-height: 976px; margin: 0 auto; box-shadow: 0 10px 30px #1a1b1c1f; }
.sidebar { width: 240px; flex: 0 0 240px; background: var(--navy); color: #fff; }
.sidebar-header { height: 71px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #ffffff20; }
.sidebar-logo { display: block; width: 151px; height: 58px; object-fit: contain; }
nav { padding: 10px 0; }
.nav-row { display: flex; align-items: center; width: 100%; height: 55px; padding: 0 20px; border: 0; background: transparent; color: #fff; text-align: left; font-size: 14px; line-height: 21px; }
.nav-group { justify-content: space-between; }
.chevron { width: 7px; height: 7px; margin-right: 1px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.nav-group[aria-expanded='false'] .chevron { transform: rotate(-45deg); }
.nav-submenu { padding: 15px 0; background: var(--subnav); }
.nav-submenu button { position: relative; display: block; width: 100%; height: 55px; border: 0; padding: 0 20px 0 54px; background: transparent; color: #fff; text-align: left; font-size: 12px; line-height: 18px; }
.nav-submenu button::before { content: '▫'; position: absolute; left: 33px; top: 50%; transform: translateY(-50%); font-size: 15px; }
.nav-active { background: var(--blue); }
nav button:hover { background: #1779b3; }
main { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 24px; }
.page-header { border-bottom: 1px solid #c8c8c8; padding-bottom: 16px; }
h1 { margin: 0; font-size: 32px; font-weight: 500; text-align: center; line-height: 1.2; }
.document-panel { width: 100%; margin-top: 60px; min-height: 532px; padding: 35px 15px; border: 1px solid var(--navy); border-radius: 16px; box-shadow: 0 5px 5px var(--navy); text-align: center; }
.panel-logo { display: block; width: 232px; max-width: 100%; height: 94px; margin: 0 auto 18px; object-fit: contain; }
.brand-caption { margin: 0 0 30px; color: var(--navy); font-size: 9px; line-height: 13px; letter-spacing: .5px; }
form { width: 100%; max-width: 592px; margin: 0 auto; text-align: left; }
.intro { margin: 0 0 15px; line-height: 24px; }
.field { margin-bottom: 8px; }
label { display: block; line-height: 24px; }
.field input { display: block; width: 100%; height: 38px; padding: 6px 12px; border: 1px solid #ced4da; border-radius: 4px; background: var(--surface); color: #212529; }
.control-placeholder p { margin: 0; line-height: 24px; }
.reserved-control { display: flex; align-items: center; justify-content: center; width: 126px; height: 48px; color: #6c757d; font-size: 10px; letter-spacing: .2px; }
.code-input { display: block; width: 206px; max-width: 100%; height: 30px; padding: 1px 3px; border: 1px solid #828282; border-radius: 1px; background: var(--surface); }
.check-button { display: block; width: 50%; height: 40px; margin: 28px auto 0; padding: 7px 12px; border: 0; border-radius: 5px; background: var(--navy); color: white; }
.check-button:hover { background: #294786; }
input:focus-visible, button:focus-visible { outline: 2px solid #169ed4; outline-offset: 3px; }
.form-result { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid #169ed4; background: #f1f5fa; color: #344766; font-size: 13px; }
footer { margin-top: auto; padding-top: 32px; color: #6c757d; font-size: 10px; text-align: center; }
footer strong { font-weight: 500; }
footer p { max-width: 730px; margin: 3px auto 0; }
.menu-toggle, .menu-overlay { display: none; }
.skip-link { position: absolute; top: -70px; left: 12px; z-index: 10; padding: 10px; background: var(--surface); color: var(--navy); }
.skip-link:focus { top: 12px; }
.placeholder-notice { position: fixed; bottom: 20px; left: 50%; z-index: 5; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 12px 18px; background: var(--navy); color: #fff; border-radius: 5px; box-shadow: 0 3px 14px #0003; font-size: 14px; }
[hidden] { display: none !important; }
@media (min-width: 781px) and (max-width: 1050px) {
  .top-header-inner { gap: 16px; padding-right: 24px; padding-left: 24px; }
  .top-header-controls { gap: 12px; }
}
@media (max-width: 1199px) {
  .sidebar { position: fixed; inset: var(--top-header-height) auto 0 0; z-index: 4; overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .18s ease; }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .menu-overlay:not([hidden]) { display: block; position: fixed; inset: var(--top-header-height) 0 0; z-index: 3; border: 0; background: #0006; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: #fff; font-size: 17px; }
}
@media (max-width: 780px) {
  .top-header-inner { gap: 12px; padding: 4px 12px 0; }
  .top-header-brand { gap: 10px; }
  .top-header-mark { width: 34px; height: 34px; }
  .top-header-identity strong { font-size: 23px; line-height: 28px; }
  .top-header-identity span { font-size: 13px; line-height: 18px; }
  .top-header-controls { gap: 8px; }
  .header-service, .header-login { display: none; }
  .header-icon { width: 36px; height: 40px; }
  .header-control svg { width: 21px; height: 21px; }
  main { padding: 12px; }
  h1 { font-size: 24px; }
  .page-header { padding-bottom: 17px; }
  .document-panel { min-height: 556px; padding: 35px 15px; }
  .panel-logo { width: 232px; height: 94px; }
  .brand-caption { margin-bottom: 30px; font-size: 8px; }
  .intro { text-align: center; margin-bottom: 15px; }
  .check-button { margin-top: 28px; }
  footer { margin-bottom: 8px; }
}
@media (max-width: 359px) {
  .top-header-mark { width: 28px; height: 28px; }
  .top-header-brand { gap: 8px; }
  .top-header-identity strong { font-size: 20px; }
  .header-icon { width: 32px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Success popup only; all approved page rules above remain unchanged. */
.success-dialog { top: 0; width: calc(100% - 16px); max-width: 500px; max-height: calc(100svh - 16px); margin: 28px auto 0; padding: 16px; overflow: auto; border: 1px solid #737373; border-radius: 16px; background: #fff; color: #212529; font: inherit; box-shadow: none; }
.success-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.success-dialog h2 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; }
.success-message { margin: 36px 0 16px; line-height: 24px; }
.success-download { display: block; padding: 0; border: 0; background: transparent; color: #00f; font: inherit; line-height: 24px; text-align: left; text-decoration: underline; cursor: pointer; }
.success-actions { display: flex; justify-content: flex-end; margin-top: 31px; }
.success-close { min-height: 35px; padding: 5px 12px; border: 0; border-radius: 4px; background: var(--navy); color: #fff; font: inherit; line-height: 24px; }
.success-close:hover { background: #294786; }
@media (max-width: 575px) { .success-dialog { margin-top: 8px; } }
