/* DIL Scholarship Program - DIL brand styles. No inline styles are used (strict CSP). */
:root {
  --dil-blue: #2760ab;
  --dil-blue-dark: #1d4d8c;
  --dil-sky: #1a82b8;
  --dil-green: #8db33a;
  --dil-green-light: #afcb5f;
  --ink: #1f2933;
  --muted: #5b6b7b;
  --surface: #ffffff;
  --page: #f4f7fb;
  --line: #dbe3ec;
  --bs-primary: #2760ab;
  --bs-primary-rgb: 39, 96, 171;
  --bs-link-color: #2760ab;
  --bs-link-color-rgb: 39, 96, 171;
  --bs-link-hover-color: #1d4d8c;
  --bs-body-color: #1f2933;
  --bs-body-bg: #f4f7fb;
}
@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../vendor/fonts/noto-nastaliq-urdu-arabic-400-normal.1d9ba7ff26a9.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("../vendor/fonts/noto-nastaliq-urdu-arabic-700-normal.05bf8c16d8dd.woff2") format("woff2");
}
body { background: var(--page); color: var(--ink); font-size: .95rem; }
html[lang="ur"] body { font-family: "Noto Nastaliq Urdu", system-ui, sans-serif; line-height: 2.1; font-size: 1rem; }
html[lang="ur"] .ltr, html[lang="ur"] input, html[lang="ur"] .font-latin { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.5; }
.btn-primary { --bs-btn-bg: var(--dil-blue); --bs-btn-border-color: var(--dil-blue); --bs-btn-hover-bg: var(--dil-blue-dark); --bs-btn-hover-border-color: var(--dil-blue-dark); --bs-btn-active-bg: var(--dil-blue-dark); }
.btn-outline-primary { --bs-btn-color: var(--dil-blue); --bs-btn-border-color: var(--dil-blue); --bs-btn-hover-bg: var(--dil-blue); --bs-btn-hover-border-color: var(--dil-blue); --bs-btn-active-bg: var(--dil-blue-dark); }
.btn-success { --bs-btn-bg: #5e8a1c; --bs-btn-border-color: #5e8a1c; --bs-btn-hover-bg: #4d7216; --bs-btn-hover-border-color: #4d7216; }
.text-primary { color: var(--dil-blue) !important; }
.bg-primary { background-color: var(--dil-blue) !important; }
.bg-purple, .text-bg-purple { background-color: #6f42c1 !important; color: #fff !important; }
.brand-bar { background: #fff; border-bottom: 4px solid var(--dil-green); }
.brand-bar .navbar-brand img { height: 2.5rem; width: auto; }
.brand-title { font-weight: 700; color: var(--dil-blue); line-height: 1.1; }
.brand-sub { font-size: .75rem; color: var(--muted); }
.test-banner { background: #fff3cd; color: #664d03; border-bottom: 1px solid #ffe69c; font-size: .85rem; }
.hero { background: linear-gradient(135deg, var(--dil-blue) 0%, var(--dil-sky) 100%); color: #fff; }
.hero .lead { color: #eaf2fb; }
.hero-card { background: #fff; color: var(--ink); border-radius: 1rem; }
.card { border-color: var(--line); border-radius: .75rem; }
.card-header { background: #fff; border-bottom-color: var(--line); font-weight: 600; }
.section-title { color: var(--dil-blue); font-weight: 700; }
.req { color: #b02a37; }
.footer { background: #13325a; color: #cfdced; font-size: .85rem; }
.footer a { color: #fff; }
.footer .small-muted { color: #9fb3cc; }
.step-nav .list-group-item { display: flex; align-items: center; gap: .5rem; border-color: var(--line); }
.step-nav .list-group-item.active { background: var(--dil-blue); border-color: var(--dil-blue); }
.step-nav .step-icon { width: 1.4rem; text-align: center; }
.step-nav .complete .step-icon { color: #3f7d20; }
.step-nav .active .step-icon { color: #fff; }
.step-nav .incomplete .step-icon { color: #b58105; }
.row-card { border: 1px dashed var(--line); border-radius: .6rem; padding: .75rem .75rem 0; margin-bottom: .75rem; background: #fbfdff; }
.row-card.row-hidden { display: none; }
.row-card legend { font-size: .9rem; font-weight: 600; color: var(--muted); float: none; width: auto; margin-bottom: .25rem; }
.radio-group.is-invalid { outline: 1px solid #dc3545; border-radius: .375rem; padding: .25rem .5rem; }
.otp-input { font-size: 1.6rem; letter-spacing: .6rem; text-align: center; max-width: 16rem; }
.stat-card { border: 0; border-left: 4px solid var(--dil-blue); border-radius: .6rem; background: #fff; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.stat-card.b-secondary { border-left-color: #8a96a3; }
.stat-card.b-info { border-left-color: var(--dil-sky); }
.stat-card.b-warning { border-left-color: #d49b00; }
.stat-card.b-primary { border-left-color: var(--dil-blue); }
.stat-card.b-purple { border-left-color: #6f42c1; }
.stat-card.b-dark { border-left-color: #343a40; }
.stat-card.b-success { border-left-color: #5e8a1c; }
.stat-card.b-danger { border-left-color: #b02a37; }
a.stat-link { text-decoration: none; color: inherit; }
a.stat-link:hover .stat-card { box-shadow: 0 .25rem .75rem rgba(39,96,171,.15); }
.bar { display: inline-block; width: 100%; height: 10px; background: #eef2f7; border-radius: 4px; vertical-align: middle; }
.bar-fill { display: block; height: 10px; background: var(--dil-blue); border-radius: 4px; }
.bar-fill.w-0{width:0%}
.bar-fill.w-5{width:5%}
.bar-fill.w-10{width:10%}
.bar-fill.w-15{width:15%}
.bar-fill.w-20{width:20%}
.bar-fill.w-25{width:25%}
.bar-fill.w-30{width:30%}
.bar-fill.w-35{width:35%}
.bar-fill.w-40{width:40%}
.bar-fill.w-45{width:45%}
.bar-fill.w-50{width:50%}
.bar-fill.w-55{width:55%}
.bar-fill.w-60{width:60%}
.bar-fill.w-65{width:65%}
.bar-fill.w-70{width:70%}
.bar-fill.w-75{width:75%}
.bar-fill.w-80{width:80%}
.bar-fill.w-85{width:85%}
.bar-fill.w-90{width:90%}
.bar-fill.w-95{width:95%}
.bar-fill.w-100{width:100%}
.progress-bar.pw-0{width:0%}
.progress-bar.pw-5{width:5%}
.progress-bar.pw-10{width:10%}
.progress-bar.pw-15{width:15%}
.progress-bar.pw-20{width:20%}
.progress-bar.pw-25{width:25%}
.progress-bar.pw-30{width:30%}
.progress-bar.pw-35{width:35%}
.progress-bar.pw-40{width:40%}
.progress-bar.pw-45{width:45%}
.progress-bar.pw-50{width:50%}
.progress-bar.pw-55{width:55%}
.progress-bar.pw-60{width:60%}
.progress-bar.pw-65{width:65%}
.progress-bar.pw-70{width:70%}
.progress-bar.pw-75{width:75%}
.progress-bar.pw-80{width:80%}
.progress-bar.pw-85{width:85%}
.progress-bar.pw-90{width:90%}
.progress-bar.pw-95{width:95%}
.progress-bar.pw-100{width:100%}
.sidebar { background: #fff; border-right: 1px solid var(--line); min-height: calc(100vh - 64px); }
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line); }
.sidebar .nav-link { color: var(--ink); border-radius: .5rem; padding: .45rem .75rem; display: flex; gap: .5rem; align-items: center; }
.sidebar .nav-link:hover { background: #eef3fa; }
.sidebar .nav-link.active { background: var(--dil-blue); color: #fff; }
.sidebar .nav-heading { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem .75rem .25rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f7f9fc; }
.table-kv th { width: 38%; color: var(--muted); font-weight: 500; background: #f9fbfd; }
.score-table td, .score-table th { vertical-align: middle; }
.score-section { background: #eef3fa; font-weight: 600; }
.adjusted { background: #fff8e1; }
.evidence { color: var(--muted); font-size: .82rem; }
.flag-danger { border-left: 4px solid #b02a37; }
.flag-warning { border-left: 4px solid #d49b00; }
.flag-info { border-left: 4px solid var(--dil-sky); }
.statement { white-space: pre-wrap; background: #fbfdff; border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; }
.qr-code { width: 180px; height: 180px; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: .5rem; }
.backup-codes { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.1rem; }
.word-count.bad { color: #b02a37; font-weight: 600; }
.word-count.good { color: #3f7d20; font-weight: 600; }
.policy-body h1, .policy-body h2, .policy-body h3 { color: var(--dil-blue); font-size: 1.1rem; margin-top: 1.25rem; }
.policy-body table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
.policy-body td, .policy-body th { border: 1px solid var(--line); padding: .35rem .5rem; }
.policy-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: .5rem; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244,247,251,.96); border-top: 1px solid var(--line); padding: .75rem 0; z-index: 10; }
@media (max-width: 991.98px) { .sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); } }
/* desktop: the staff menu stays in place while the page scrolls, and scrolls on its own when it is longer than the screen */
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; align-self: flex-start; height: 100vh; min-height: 0; overflow-y: auto;
             overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; z-index: 2; }
  .sidebar::-webkit-scrollbar { width: 8px; }
  .sidebar + main { min-height: 100vh; }
  .sidebar::-webkit-scrollbar-thumb { background: #c9d4e3; border-radius: 4px; }
}
@media print {
  .no-print, nav, .footer, .sidebar, .sticky-actions, .btn { display: none !important; }
  body { background: #fff; }
}
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3, html[lang="ur"] .display-6 { line-height: 1.9; }
html[lang="ur"] .hero .text-uppercase { margin-bottom: 1rem !important; }
html[lang="ur"] .form-label { margin-bottom: .1rem; }
.upload-input { min-width: 16rem; max-width: 100%; }

/* Committee decision table */
.pct-input { max-width: 5rem; }

/* show / hide password button */
.password-toggle-wrap .password-toggle { border-color: var(--bs-border-color); color: #495057; }
.password-toggle-wrap .form-control.is-invalid + .password-toggle { border-color: var(--bs-form-invalid-border-color); }
.password-toggle-wrap .password-toggle:focus-visible { box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .25); }
input[data-mask="date"] { letter-spacing: .03em; }

/* Display size (Settings > Display size on computers): on laptops / desktops the whole interface is drawn smaller,
   like the browser zoomed out, because Bootstrap sizes text, spacing and controls in rem. Phones / tablets keep 100%. */
@media (min-width: 992px) {
  html.ui-95 { font-size: 95%; }
  html.ui-90 { font-size: 90%; }
  html.ui-85 { font-size: 85%; }
  html.ui-80 { font-size: 80%; }
  html.ui-75 { font-size: 75%; }
  html[lang="ur"].ui-85, html[lang="ur"].ui-80, html[lang="ur"].ui-75 { font-size: 90%; }
}

/* ---- missing required items (application form) ---------------------------------------- */
.missing-box { border-left: 5px solid #e0a800; }
.form-control.is-missing, .form-select.is-missing { border-color: #e0a800; background-color: #fffaeb; box-shadow: 0 0 0 .15rem rgba(224, 168, 0, .25); }
.is-missing-group { outline: 2px solid #e0a800; outline-offset: 4px; border-radius: .25rem; background-color: #fffaeb; }
.missing-note { color: #9a6700; font-size: .8125rem; font-weight: 600; margin-top: .25rem; }
.missing-note::before { content: "\26A0  "; }
.doc-missing { background-color: #fff5f5 !important; box-shadow: inset 4px 0 0 #dc3545; }
.err-list > span + span::before { content: ", "; }
.minw-15 { min-width: 15rem; }
.minw-18 { min-width: 18rem; }
/* Message templates / award letter (Administration) */
.template-editor { font-size: .9rem; line-height: 1.45; tab-size: 2; }
.font-urdu { font-family: "Noto Nastaliq Urdu", system-ui, sans-serif; line-height: 2.1; }
.email-preview { white-space: pre-wrap; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: .9rem; background: #fbfcfe; max-height: 32rem; overflow: auto; }
.standard-text { white-space: pre-wrap; font-size: .8rem; max-height: 20rem; overflow: auto; }
.ph-chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; }
.copy-ok { color: var(--bs-success); }
.page-text p:last-child { margin-bottom: 0; }
