/* NPC 5S Certification Portal — the colours of the present 5S portal (white logo band, red-700 menu bar).
   No outside fonts or scripts. The variable names are kept from v1.0 so every screen follows.
   Contrast and readability fixes from the independent UI/UX review of 23-10-2026 (U-01 … U-23) are built in;
   every text colour below passes WCAG 2.1 AA (4.5:1), every border / focus ring 3:1. */
:root { --navy: #b91c1c; --navy2: #991b1b; --navy3: #7f1d1d; --gold: #b91c1c; --grey: #f8fafc; --line: #d1d5db; --text: #1f2937;
  --field: #6b7280; --ring: #991b1b; --muted: #555b66; }
body { font-family: ui-sans-serif, system-ui, "Segoe UI", "Nirmala UI", "Noto Sans", Arial, sans-serif; color: #020817; background: #fff; font-size: 16px; }
a { color: var(--navy2); } a:hover { color: var(--navy3); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 1000; }

/* U-04: one visible keyboard-focus sign everywhere (3 px dark red; white on the red menu bar) */
:focus-visible { outline: 3px solid var(--ring) !important; outline-offset: 2px; box-shadow: none !important; }
nav.main :focus-visible { outline-color: #fff !important; }
nav.main .dropdown-menu :focus-visible { outline-color: #fff !important; outline-offset: -5px; }  /* inside the dark-red highlighted item */

/* logo band of the earlier portal: three pictures side by side, 80 px high */
.brand { background: #fff; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; height: 104px; padding: 0 16px; position: relative; }
.brand a { display: flex; justify-content: center; } .brand img { height: 80px; width: 100%; max-width: 445px; object-fit: contain; }
.brand .lang { position: absolute; top: 4px; right: 10px; display: flex; gap: 8px; align-items: center; }
.brand .lang button { border: 1px solid var(--field); background: #fff; border-radius: 4px; font-size: 14px; padding: 4px 10px; color: #374151; }
.brand .lang button:hover { background: #f3f4f6; color: #111827; }
.brand .sys { font-size: 13px; color: #4b5563; }
/* U-19: on a phone the language button gets its own row under the logo instead of covering it */
@media (max-width: 767px) { .brand { grid-template-columns: 1fr; height: auto; padding: 6px 10px 4px; } .brand .b-sbm, .brand .b-dpiit { display: none; }
  .brand img { height: 56px; } .brand .lang { position: static; justify-content: flex-end; margin-top: 4px; }
  .brand .lang button { min-height: 36px; padding: 6px 12px; } }

/* the red menu bar (red-700), sticky, items spread evenly, white semibold 16 px */
nav.main { background: #b91c1c; min-height: 64px; padding: 0 8px; position: sticky; top: 0; z-index: 20; }
nav.main .nav-link { color: #fff; font-weight: 600; font-size: 16px; padding: 20px 12px; border-radius: 4px; }
/* U-01: pointing at, tabbing to, or opening an item keeps the text white; it gets a darker red and an underline */
nav.main .nav-link:hover, nav.main .nav-link:focus, nav.main .nav-link:focus-visible, nav.main .nav-link:active, nav.main .nav-link.show {
  color: #fff; background: var(--navy2); text-decoration: underline; text-underline-offset: 6px; }
nav.main .nav-link.on { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
nav.main .dropdown-menu { border-radius: 6px; border-color: var(--field); } nav.main .dropdown-item { font-weight: 500; color: #1f2937; padding: 8px 16px; }
nav.main .dropdown-item:hover, nav.main .dropdown-item:focus { color: #fff; background: var(--navy2); }
nav.main .dropdown-item:active, nav.main .dropdown-item.active { color: #fff; background: var(--navy3); }
nav.main .navbar-toggler { border: 1px solid #fff; margin: 12px 4px; color: #fff; } nav.main .bars { font-weight: 700; letter-spacing: 1px; }
nav.main .navbar-toggler:hover { background: var(--navy2); }
/* the separate "Log out" button on the bar (C-03) */
nav.main .logout { border: 1px solid #fff; border-radius: 6px; padding: 6px 14px; margin: 13px 0; }
nav.main .logout:hover, nav.main .logout:focus, nav.main .logout:focus-visible, nav.main .logout:active {
  color: #fff !important; background: var(--navy2) !important; border-color: #fff !important; }
@media (max-width: 767px) { nav.main .nav-link { padding: 10px 12px; } nav.main .navbar-toggler { min-height: 44px; min-width: 56px; } }

.wrap { padding: 16px 20px; max-width: 1400px; margin: 0 auto; }
h1, h2 { color: var(--navy); } h1 { font-size: 22px; } h2 { font-size: 17px; }
.cardx { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 12px; }
/* U-23: counts are dark grey; red stays for things that need attention (chips, alerts) */
.kpi { font-size: 26px; font-weight: bold; color: var(--text); }
/* U-10: no reading text below 14 px */
.lbl { color: var(--muted); font-size: 14px; }
table.t { width: 100%; border-collapse: collapse; background: #fff; }
table.t th { background: var(--navy); color: #fff; font-size: 14px; padding: 8px; text-align: left; }
table.t th a { color: #fff; }
table.t td { border-bottom: 1px solid #dde2ea; padding: 8px; font-size: 14px; vertical-align: top; }
.right, table.t th.right, table.t td.right { text-align: right; } .small, small { font-size: 14px; } .small { color: var(--muted); }
.form-label.small, label.small { color: #374151; }
.chip { display: inline-block; border-radius: 10px; padding: 2px 9px; font-size: 12px; font-weight: bold; border: 1px solid; }
.red { background: #fbe3e1; color: #9c1c12; border-color: #d9776d; } .amb { background: #fff1d6; color: #7a4e00; border-color: #d9a640; }
.grn { background: #e2f1dc; color: #245c16; border-color: #86b874; } .gry { background: #eef0f4; color: #3c4350; border-color: var(--line); }
.nav { background: #dfe6f4; color: var(--navy); border-color: #7d8fb8; }
.lock { background: #eef0f4; border: 1px dashed #7d8fb8; padding: 6px 8px; border-radius: 5px; }
code { color: #111827; background: #f3f4f6; font-size: 15px; padding: 1px 4px; border-radius: 3px; }

/* ---- buttons (U-03, U-14). Primary = red filled; secondary = grey outline; danger = red outline.
   Bootstrap 5.3 draws every state from --bs-btn-* variables, so each state is set here. ---- */
.btn-navy { --bs-btn-color: #fff; --bs-btn-bg: #b91c1c; --bs-btn-border-color: #b91c1c;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #991b1b; --bs-btn-hover-border-color: #991b1b;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #7f1d1d; --bs-btn-active-border-color: #7f1d1d;
  --bs-btn-disabled-color: #374151; --bs-btn-disabled-bg: #e5e7eb; --bs-btn-disabled-border-color: #6b7280; --bs-btn-disabled-opacity: 1;
  --bs-btn-focus-shadow-rgb: 153,27,27; }
.btn-outline-secondary { --bs-btn-color: #374151; --bs-btn-border-color: #6b7280;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #4b5563; --bs-btn-hover-border-color: #4b5563;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #374151; --bs-btn-active-border-color: #374151;
  --bs-btn-disabled-color: #6b7280; --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: #9ca3af; --bs-btn-disabled-opacity: 1; }
.btn-outline-danger { --bs-btn-color: #b02a37; --bs-btn-border-color: #b02a37;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #b02a37; --bs-btn-hover-border-color: #b02a37;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #8f1d28; --bs-btn-active-border-color: #8f1d28;
  --bs-btn-disabled-color: #6b7280; --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: #9ca3af; --bs-btn-disabled-opacity: 1; }
.btn-link { --bs-btn-color: #991b1b; --bs-btn-hover-color: #7f1d1d; --bs-btn-active-color: #7f1d1d; --bs-btn-disabled-color: #6b7280; }

/* ---- form fields (U-05, U-06): borders 4.8:1, placeholders 4.8:1, a red ring on focus ---- */
.form-control, .form-select { border-color: var(--field); }
.form-control::placeholder, .old-input::placeholder, .login-table input::placeholder { color: #64748b; opacity: 1; }
.form-control:focus, .form-select:focus, .old-input:focus { border-color: var(--ring); box-shadow: none; outline: 2px solid var(--ring); }
.form-check-input { border-color: var(--field); width: 1.25em; height: 1.25em; }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
.form-check-input:focus { border-color: var(--ring); box-shadow: none; }

.tabs a { display: inline-block; padding: 8px 12px; text-decoration: none; border: 1px solid var(--line); border-bottom: none; border-radius: 6px 6px 0 0; background: #eef0f4; margin-right: 2px; color: var(--navy2); }
.tabs a:hover { background: #fff; text-decoration: underline; }
.tabs a.on { background: #fff; font-weight: bold; }
.tabpane { background: #fff; border: 1px solid var(--line); padding: 14px; border-radius: 0 6px 6px 6px; }
.diff { background: #fff1d6; }

/* ---- phone (U-11, U-13). Stacked tables: each value shows its column name, taken from data-label on the <td>.
   Wide tables (MIS "Cases by RD and stage") scroll sideways inside their card, with a shadow at the edge that still has more. ---- */
.table-scroll { overflow-x: auto; }
@media (max-width: 768px) { .wrap { padding: 10px; } table.t.stack thead { display: none; } table.t.stack td { display: block; border: none; padding: 4px 8px; font-size: 15px; }
  table.t.stack tr { display: block; border: 1px solid var(--line); margin-bottom: 8px; background: #fff; }
  table.t.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: #374151; }
  table.t.stack td[data-label=""]::before { content: none; }
  table.t.stack td.right { text-align: left; }
  .table-scroll, .cardx:has(> table.t:not(.stack)) { overflow-x: auto; -webkit-overflow-scrolling: touch;
    background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 32px 100% no-repeat local,
                linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 32px 100% no-repeat local,
                radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.25), rgba(0,0,0,0)) left / 12px 100% no-repeat scroll,
                radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.25), rgba(0,0,0,0)) right / 12px 100% no-repeat scroll, #fff; }
  .table-scroll > table.t, .cardx:has(> table.t:not(.stack)) > table.t { background: transparent; }
  .table-scroll > table.t th, .table-scroll > table.t td, .cardx > table.t:not(.stack) th, .cardx > table.t:not(.stack) td { white-space: nowrap; }
  .cardx:has(> table.t:not(.stack)) > h2 { position: sticky; left: 0; }
}
@media (max-width: 767px) { .btn-sm, .tabs a { min-height: 44px; } .btn-sm { display: inline-flex; align-items: center; justify-content: center; }
  .tabs a { display: inline-flex; align-items: center; } .foot a { display: inline-block; padding: 10px 0; } }

/* footer (U-10): 14 px, darker grey, links underlined so they read as links */
.foot { border-top: 1px solid #e5e7eb; margin-top: 32px; font-size: 14px; color: #4b5563; } .foot a { color: #4b5563; text-decoration: underline; } .foot a:hover { color: #111827; }
.poster img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.poster-card { display: flex; flex-direction: column; padding: 10px; margin: 0; }
.poster-thumb { display: block; aspect-ratio: 2 / 3; background: #f3f4f6; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.poster-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.poster-card .qty { max-width: 80px; }
.order-bar { border-left: 6px solid #b91c1c; }

/* ---- public pages in the look of the earlier portal ---- */
.hero { position: relative; background: #e2e8f0; overflow: hidden; }
/* U-20: photos keep their shape (cover, not stretched) */
.hero .carousel-item img { width: 100%; height: 400px; object-fit: cover; display: block; }
/* C-22: the arrows get a dark edge so they show on a bright photo */
.hero .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 2px solid #374151;
  background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.25); font-size: 20px; z-index: 5; color: #111827; }
.hero .arrow.prev { left: 16px; } .hero .arrow.next { right: 16px; }
@media (max-width: 767px) { .hero .carousel-item img { height: 220px; } }
.page-grey { background: #f9fafb; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1232px; margin: 24px auto; padding: 0 24px; }
@media (max-width: 767px) { .features { grid-template-columns: 1fr; } }
.feature { background: #fff; border-radius: 16px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); padding: 24px; text-align: center; transition: transform .2s; }
.feature:hover { transform: scale(1.05); } .feature svg { width: 56px; height: 56px; color: #16a34a; }
.feature h3 { font-size: 20px; font-weight: 700; margin: 8px 0 0; color: #020817; } .feature p { color: #4b5563; margin: 8px 0 0; }
.cta { max-width: 1280px; margin: 0 auto; padding: 24px; }
.cta h1 { font-size: 48px; font-weight: 800; color: #1f2937; line-height: 1.25; } .cta p { font-size: 18px; color: #4b5563; margin-top: 16px; }
@media (max-width: 767px) { .cta h1 { font-size: 36px; } }
.btn-old { --bs-btn-color: #f8fafc; --bs-btn-bg: #0f172a; --bs-btn-border-color: #0f172a;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #1e293b; --bs-btn-hover-border-color: #1e293b;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #334155; --bs-btn-active-border-color: #334155;
  --bs-btn-disabled-color: #374151; --bs-btn-disabled-bg: #e5e7eb; --bs-btn-disabled-border-color: #6b7280; --bs-btn-disabled-opacity: 1;
  border-radius: 6px; font-weight: 500; }
.btn-old.big { font-size: 18px; padding: 14px 32px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.15); }
.old-heading { font-size: 36px; font-weight: 600; text-align: center; color: #1e3a8a; text-decoration: underline; text-underline-offset: 6px; }
.old-input { border: 2px solid var(--field); border-radius: 4px; padding: 10px 14px; width: 100%; margin-bottom: 18px; font-size: 16px; }
.login-chip { display: inline-block; background: linear-gradient(to bottom, #f5d675, #a8bfc5); padding: 8px 40px; border-radius: 6px; font-weight: 700; font-size: 20px; color: #111827; }
.login-table { width: 100%; border-collapse: collapse; } .login-table td { border: 1px solid var(--field); padding: 0; }
.login-table td.l { width: 30%; text-align: center; padding: 8px; color: #1f2937; }
/* U-04 / C-07: the login boxes now show where the cursor is */
.login-table input { border: 0; width: 100%; padding: 10px; }
.login-table input:focus, .login-table input:focus-visible { outline: 3px solid var(--ring) !important; outline-offset: -3px; }
/* U-14: the earlier portal's grey "Login Now", in a dark grey (10.3:1) that does not look switched off */
.btn-login { background: #374151; color: #fff; border-radius: 8px; padding: 10px 40px; font-weight: 600; border: 2px solid #374151; }
.btn-login:hover { background: #1f2937; border-color: #1f2937; color: #fff; }
.btn-login:active { background: #111827; border-color: #111827; color: #fff; }
.btn-login:disabled { background: #e5e7eb; border-color: #6b7280; color: #374151; }
@keyframes spinY { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
.spin-y { animation: spinY 3s linear infinite; } @media (prefers-reduced-motion: reduce) { .spin-y { animation: none; } }
main.wrap:empty { display: none; }

/* the "5S Scheme at a glance" picture (U-02), when shown as the SVG */
img.scheme-glance { width: 100%; max-width: 560px; height: auto; }

/* ---- Hindi (U-10): Devanagari needs a size or two more than Latin ---- */
html[lang=hi] body { font-size: 17px; }
html[lang=hi] .small, html[lang=hi] small, html[lang=hi] .lbl, html[lang=hi] .form-label, html[lang=hi] label,
html[lang=hi] table.t th, html[lang=hi] table.t td, html[lang=hi] .foot, html[lang=hi] .dropdown-item { font-size: 15px; }
html[lang=hi] nav.main .nav-link { font-size: 17px; } html[lang=hi] .chip { font-size: 13px; }
html[lang=hi] .btn { font-size: 17px; } html[lang=hi] .btn-sm { font-size: 15px; }

/* ---- Admin centre (24-10-2026): tiles, and simple bar rows drawn without scripts ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile { display: block; text-decoration: none; color: var(--text); border-left: 4px solid var(--navy); margin-bottom: 0; }
.tile b { display: block; color: var(--navy); font-size: 17px; margin-bottom: 4px; }
.tile span { color: #374151; font-size: 14px; }
.tile:hover, .tile:focus-visible { background: #fdf2f2; color: var(--text); }
.barrow { display: grid; grid-template-columns: 48px 1fr 44px; gap: 6px; align-items: center; font-size: 14px; }
.bar { background: #eef0f4; height: 12px; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy2); }
.okdot::before { content: "●"; color: #245c16; margin-right: 4px; } .baddot::before { content: "●"; color: #9c1c12; margin-right: 4px; }
