/* PayScale 2026 - single stylesheet (no external fonts/CDNs; strict CSP friendly) */
:root {
  --navy: #1f3864;
  --navy-dark: #162a4c;
  --gold: #c9a227;
  --gold-soft: #ffd966;
  --blue-soft: #d9e1f2;
  --input-bg: #ddebf7;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1c2333;
  --muted: #5b6579;
  --line: #d5dbe8;
  --ok: #1b7f3b;
  --bad: #b3261e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --font: "Noto Sans Bengali", "Kalpurush", "SolaimanLipi", "Nirmala UI", "Vrinda", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 1.6rem; line-height: 1.35; margin: 1.2rem 0 .5rem; color: var(--navy); }
h2 { font-size: 1.2rem; margin: 0 0 .6rem; color: var(--navy); }
h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; color: var(--navy); }
h1 small, h2 small { font-weight: 400; color: var(--muted); font-size: .8em; }
a { color: #1a54b8; }
a:hover { color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
code { background: #eef1f8; padding: .1em .35em; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- courtesy band (navy, white bold text, gold stripes) ---------- */
.courtesy { background: var(--navy); color: #fff; border-top: 4px solid var(--gold); border-bottom: 4px solid var(--gold); font-weight: 700; }
.courtesy-inner { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.courtesy-left, .courtesy-right { display: flex; flex-direction: column; }
.courtesy-right { text-align: right; }
.courtesy-name { font-size: 1.15rem; letter-spacing: .02em; }
.courtesy-desig, .courtesy-right { font-size: .9rem; }
.courtesy a { color: #fff; text-decoration: none; }
.courtesy a:hover { text-decoration: underline; }

/* ---------- header / nav ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-header { border-bottom: 3px solid var(--navy); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: var(--gold-soft); font-size: 1.4rem; font-weight: 700; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small { color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.site-nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--text); }
.site-nav a:hover { background: var(--blue-soft); }
.site-nav a.active { background: var(--navy); color: #fff; }
.nav-toggle { display: none; }

main.container { padding-top: 8px; padding-bottom: 40px; min-height: 60vh; }
.site-footer { background: var(--navy-dark); color: #dfe6f5; padding: 18px 0; font-size: .9rem; }
.site-footer a { color: var(--gold-soft); }

/* ---------- components ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin: 16px 0; }
.panel.warn { border-left: 5px solid var(--gold); }
.panel.narrow, .narrow { max-width: 560px; }
.hero { background: linear-gradient(135deg, var(--navy), #2c4f8f); color: #fff; padding: 24px; border-radius: var(--radius); margin: 16px 0; }
.hero h1 { color: #fff; margin-top: 0; }
.hero .muted { color: #d3dcf1; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border-top: 4px solid var(--gold); }
.card:hover { border-top-color: var(--navy); transform: translateY(-1px); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.rules dt { font-weight: 700; color: var(--navy); margin-top: .7rem; }
.rules dd { margin: 0 0 0 0; }
.notes { padding-left: 1.2rem; }
.notes li { margin-bottom: .5rem; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--navy); background: #fff; color: var(--navy); text-decoration: none; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.4; }
.btn:hover { background: var(--blue-soft); color: var(--navy); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-light { border-color: var(--line); color: var(--text); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: #fdecea; color: var(--bad); }
.btn-small { padding: 3px 10px; font-size: .875rem; }
.inline-form { display: inline; margin: 0; }
.actions { margin: 16px 0 4px; }
.print-row { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

.alert { padding: 10px 14px; border-radius: 8px; margin: 12px 0; border: 1px solid; }
.alert-success { background: #e8f6ec; border-color: #9bd3ab; color: #14532d; }
.alert-error { background: #fdecea; border-color: #f2b8b5; color: #7a1a14; }
.alert-warning { background: #fff6dd; border-color: #ecd28a; color: #6b4e00; }
.alert-info { background: #e8f0fe; border-color: #b4c8f0; color: #1d3f7a; }

.settings-bar { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; background: #eef2fb; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin: 10px 0; font-size: .92rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }

/* ---------- forms ---------- */
.form .field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-weight: 600; }
.form .field small, .field .label { font-weight: 400; color: var(--muted); }
.field .label { font-weight: 600; color: var(--text); }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #9fb0d0; border-radius: 8px; background: var(--input-bg); color: #0a2a6b; font: inherit; font-weight: 400;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #f2c94c; outline-offset: 1px; }
textarea { resize: vertical; min-height: 120px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.field-error { color: var(--bad); font-weight: 600; font-size: .875rem; }
details.payslip { margin: 8px 0; padding: 8px 12px; background: #fafbff; border: 1px dashed var(--line); border-radius: 8px; }
details.payslip summary { cursor: pointer; font-weight: 700; color: var(--navy); }

/* honeypot: invisible to people, irresistible to bots */
.hp-wrap { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tbl { border-collapse: collapse; width: 100%; font-size: .95rem; }
.tbl th, .tbl td { padding: 7px 10px; border-bottom: 1px solid #e8ecf5; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--navy); color: #fff; position: sticky; top: 0; white-space: nowrap; }
.tbl-dense { font-size: .85rem; }
.tbl-dense th, .tbl-dense td { padding: 5px 8px; white-space: nowrap; }
.tbl tbody th { font-weight: 600; background: #f7f9fe; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover td, .tbl tbody tr:hover th { background: #f1f5ff; }
.tbl tr.total th, .tbl tr.total td { background: var(--blue-soft); font-weight: 700; }
.tbl tr.strong th, .tbl tr.strong td, .tbl td.strong { font-weight: 700; }
.tbl-kv th { width: 68%; }
.tbl-periods th:first-child { min-width: 260px; }
.tbl-edit td { padding: 3px 4px; }
.tbl-edit input { padding: 5px 7px; min-width: 70px; }
.tbl-edit .input-num { text-align: right; }
td.has-error input { border-color: var(--bad); background: #fdecea; }
tr.row-error th { background: #fdecea; }
td.wrap { white-space: normal; min-width: 260px; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
.small { font-size: .8rem; }
.pager { display: flex; gap: 12px; align-items: center; margin: 16px 0; }

/* ---------- admin messages ---------- */
.msg.unread { border-left: 5px solid var(--gold); }
.msg-body { margin: .5rem 0; white-space: normal; overflow-wrap: anywhere; }
.msg-actions { display: flex; gap: 8px; }
.tag { background: var(--blue-soft); padding: 1px 8px; border-radius: 999px; font-size: .8rem; }

/* ---------- error pages ---------- */
.error-page { display: grid; place-items: center; min-height: 80vh; text-align: center; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--gold); margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .courtesy-right { text-align: left; }
  .nav-toggle { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { border-radius: 8px; }
}

/* ---------- print ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, form, .settings-bar, .print-row, .btn, .skip-link, .filter-bar, .nav-toggle { display: none !important; }
  .courtesy { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .panel { box-shadow: none; page-break-inside: avoid; }
  .table-wrap { overflow: visible; border: none; }
  .tbl thead th { position: static; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
