:root {
  --brand: #14445e;
  --brand-dark: #0d3043;
  --accent: #e8891c;
  --accent-dark: #c96f0c;
  --surface: #f5f7f9;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body { background: var(--surface); font-family: var(--bs-body-font-family); }

/* ---------- brand utilities ---------- */
.bg-brand { background-color: var(--brand) !important; }
.text-brand { color: var(--brand) !important; }
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }

.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-accent {
  --bs-btn-color: #fff; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark);
  --bs-btn-active-bg: var(--accent-dark); --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent);
}
.btn-outline-brand {
  --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand); --bs-btn-active-color: #fff;
}
a { color: var(--brand); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(232, 137, 28, .2);
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* ---------- navbar ---------- */
.brand-logo { height: 46px; width: 46px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.brand-sub { font-size: .7rem; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- bulletin ticker ---------- */
.ticker-bar { background: #fff7ec; border-bottom: 1px solid #f3d9b5; font-size: .9rem; }
.ticker-label {
  background: var(--accent); color: #fff; padding: .45rem .75rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: .25rem;
}
.ticker-label:hover { color: #fff; background: var(--accent-dark); }
.ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker 35s linear infinite; }
.ticker-viewport:hover .ticker-track, .ticker-track:focus-within { animation-play-state: paused; }
.ticker-item { padding: 0 2rem; color: #7a3e00; text-decoration: none; position: relative; }
.ticker-item::before { content: "\25CF"; position: absolute; left: .75rem; font-size: .5rem; top: .45em; color: var(--accent); }
.ticker-item:hover { text-decoration: underline; color: var(--brand); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
}

/* ---------- landing ---------- */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #1d6a8a 100%); color: #fff; }
.hero-logo { max-width: 220px; width: 70%; background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.tagline-badge { background: #1d3fbf; color: #ffe94d; font-weight: 600; white-space: normal; }
.how-steps li { margin-bottom: .35rem; }

/* ---------- auth ---------- */
.auth-logo { height: 84px; width: 84px; object-fit: contain; }
.otp-input { letter-spacing: .5em; }

/* ---------- application form ---------- */
.form-masthead .masthead-logo { height: 72px; width: 72px; object-fit: contain; }
.step-form fieldset { border: 1px solid #e4e8ec; border-radius: .6rem; padding: 1rem 1rem .25rem; margin-bottom: 1.25rem; background: #fff; }
.step-form legend { float: none; width: auto; padding: 0 .5rem; font-size: 1rem; font-weight: 700; color: var(--brand); margin-bottom: .25rem; }
.step-form .form-text { font-size: .8rem; }
.conditional-block { border-left: 3px solid var(--accent); padding-left: .75rem; margin-bottom: .75rem; }
.written-question { background: #fff7ec; border: 1px solid #f3d9b5; }
.declaration-box { background: #f0f6fa; border: 1px solid #cfe0ea; }
.declaration-box .form-check-label { font-size: .9rem; text-align: justify; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; }
.score-panel { position: sticky; top: 90px; }

/* stepper */
.stepper { display: flex; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.stepper-item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; color: #8a96a3; }
.stepper-item::after { content: ""; position: absolute; top: 18px; left: 50%; width: 100%; height: 3px; background: #dde3e8; z-index: 0; }
.stepper-item:last-child::after { display: none; }
.stepper-dot { width: 38px; height: 38px; border-radius: 50%; background: #dde3e8; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; font-size: 1rem; }
.stepper-label { font-size: .78rem; margin-top: .35rem; font-weight: 500; }
.stepper-item.done { color: var(--brand); }
.stepper-item.done .stepper-dot { background: var(--brand); color: #fff; }
.stepper-item.done::after { background: var(--brand); }
.stepper-item.active { color: var(--accent-dark); }
.stepper-item.active .stepper-dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(232, 137, 28, .25); }
@media (max-width: 575.98px) {
  .stepper-label { font-size: .68rem; }
  .stepper-dot { width: 32px; height: 32px; }
  .stepper-item::after { top: 15px; }
}

/* ---------- notices ---------- */
.poster-card img { aspect-ratio: 3 / 4; object-fit: cover; }
.notice-poster { max-height: 70vh; }
.notice-body p { margin-bottom: .75rem; }

/* ---------- acknowledgement ---------- */
.ack-logo { height: 70px; width: 70px; object-fit: contain; }
.ack-photo { width: 110px; height: 135px; object-fit: cover; border: 1px solid #ccc; }
.ack-signature { width: 110px; height: 40px; object-fit: contain; border: 1px solid #ccc; background: #fff; }
.ack-section { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--brand); margin: 1rem 0 .4rem; }
.ack-table { font-size: .85rem; }
.ack-table th { background: #f6f8fa; width: 22%; font-weight: 600; }
.ack-docs { columns: 2; }
@media (max-width: 575.98px) { .ack-docs { columns: 1; } .ack-table th { width: auto; } }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-dark); color: #dfe8ee; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- print ---------- */
@media print {
  .no-print, .navbar, .ticker-bar, .site-footer { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }
  .container { max-width: 100% !important; }
  .ack-slip { box-shadow: none !important; border: 0 !important; }
  .ack-slip .card-body { padding: 0 !important; }
  .ack-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 12mm; }
}
