/* Form 16 पोर्टल — स्टाइल (मोबाइल-फ़र्स्ट, responsive) */
:root {
  --navy: #14346b;
  --navy-dark: #0f2a5c;
  --navy-light: #e8eef9;
  --saffron: #f28c28;
  --green: #1b8a4b;
  --red: #c62828;
  --amber: #b26a00;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d9dfe8;
  --bg: #f3f5f9;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Kohinoor Devanagari", "Segoe UI", Roboto, system-ui, 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.6;
  color: var(--text); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--navy-dark); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .03em; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.page { flex: 1; padding-top: 20px; padding-bottom: 40px; }
.page-narrow { max-width: 520px; }

/* तिरंगा पट्टी */
.tricolor { display: flex; height: 5px; }
.tricolor span { flex: 1; }
.tricolor span:nth-child(1) { background: #ff9933; }
.tricolor span:nth-child(2) { background: #ffffff; }
.tricolor span:nth-child(3) { background: #138808; }

/* हेडर */
.site-header { background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.header-inner { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-logo { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-weight: 700; color: var(--navy-dark); font-size: 1.05rem; line-height: 1.3; }
.brand-sub { color: var(--text); font-size: .9rem; }
.brand-tag { color: var(--saffron); font-weight: 600; font-size: .85rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -6px; }
.site-nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--navy); font-size: .95rem; }
.site-nav a:hover, .site-nav a.active { background: var(--navy-light); }
.site-nav a.nav-exit { color: var(--red); }
@media (min-width: 760px) {
  .header-inner { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
  .brand-logo { width: 64px; height: 64px; }
  .brand-title { font-size: 1.2rem; }
  .site-nav { margin: 0; }
}

/* फ़ुटर */
.site-footer { background: var(--navy-dark); color: #d8e1f3; margin-top: auto; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; gap: 16px; padding: 24px 16px; }
.footer-title { font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-note .muted { color: #9fb0d1; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; } }

/* कार्ड व लेआउट */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title h2, .card-title h1 { margin: 0; }
.grid-2 { display: grid; gap: 20px; }
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.3fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 560px) and (max-width: 859px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.hero { text-align: center; padding: 8px 0 18px; }
.hero h1 { font-size: 1.5rem; margin-bottom: 6px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; }
@media (min-width: 760px) { .hero { padding: 16px 0 24px; } .hero h1 { font-size: 2rem; } }

/* फॉर्म */
.form-group { margin-bottom: 16px; }
label.lbl, .lbl { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy-dark); }
.lbl .req { color: var(--red); }
.hint { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--text); min-height: 48px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20, 52, 107, .15); }
textarea.input { min-height: 120px; resize: vertical; }
.input-upper { text-transform: uppercase; }
.input-captcha { max-width: 260px; letter-spacing: .15em; font-weight: 600; text-transform: uppercase; }
.form-row { display: grid; gap: 12px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; }
input[type="file"].input { padding: 9px 12px; }

.captcha-box { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.captcha-img { border: 1.5px solid var(--border); border-radius: 8px; background: #fff; height: 56px; width: auto; }
.captcha-math { font-size: 1.4rem; font-weight: 700; background: var(--navy-light); padding: 8px 18px; border-radius: 8px; letter-spacing: .1em; }

/* बटन */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 11px 20px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  min-height: 46px; transition: background .15s, transform .05s; white-space: nowrap; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-saffron { background: var(--saffron); color: #fff; }
.btn-saffron:hover { background: #d9771a; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #156e3b; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a51f1f; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy-light); }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-light:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: .9rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.1rem; min-height: 54px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.right { justify-content: flex-end; }

/* अलर्ट */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.alert-success { background: #e8f6ee; border-color: #b7e2c6; color: #155b33; }
.alert-danger, .alert-error { background: #fdecec; border-color: #f4c2c2; color: #8f1d1d; }
.alert-warning { background: #fff5e5; border-color: #fdd9a6; color: #7a4a00; }
.alert-info { background: var(--navy-light); border-color: #c5d3ee; color: var(--navy-dark); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

/* बैज */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.5; }
.badge-green { background: #dff5e7; color: #156e3b; }
.badge-gray { background: #e5e7eb; color: #4b5563; }
.badge-blue { background: var(--navy-light); color: var(--navy-dark); }
.badge-amber { background: #fff1d6; color: var(--amber); }
.badge-red { background: #fde2e2; color: #9f1a1a; }

/* टेबल */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; background: #fff; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: #f6f8fc; color: var(--navy-dark); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .cell-actions { white-space: nowrap; }
.table .cell-actions .btn + .btn, .table .cell-actions form { margin-left: 4px; display: inline; }

/* सूची/डिटेल */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.dl dt { color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--saffron); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.notice { border-left: 4px solid var(--saffron); background: #fffaf3; padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; }
.notice-title { font-weight: 700; color: var(--navy-dark); }
.notice-date { font-size: .8rem; color: var(--muted); }
.notice-body { white-space: pre-wrap; margin-top: 4px; }
.fy-block { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.fy-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.fy-head h3 { margin: 0; }
.file-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-top: 1px dashed var(--border); }
.file-row:first-of-type { border-top: none; }
.file-name { font-weight: 600; }
.file-meta { font-size: .85rem; color: var(--muted); }
.verified-banner { display: flex; gap: 12px; align-items: center; background: #e8f6ee; border: 1px solid #b7e2c6; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.verified-banner .tick { font-size: 1.6rem; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--navy); }
.stat.saffron { border-top-color: var(--saffron); } .stat.green { border-top-color: var(--green); } .stat.red { border-top-color: var(--red); }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--navy-dark); line-height: 1.2; }
.stat-label { color: var(--muted); font-size: .9rem; }
.pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager-info { color: var(--muted); font-size: .9rem; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .form-group { margin-bottom: 0; flex: 1 1 180px; }
.filters .input { min-height: 42px; padding: 8px 12px; }
.filters .btn { min-height: 42px; }
.progress { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); }
.code-box { background: #f6f8fc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; overflow-x: auto; }
.help-list { padding-left: 20px; }
.help-list li { margin-bottom: 6px; }
details.faq { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
details.faq summary { font-weight: 600; cursor: pointer; color: var(--navy-dark); }
.login-card { max-width: 440px; margin: 20px auto; }
.login-card .brand-logo { width: 72px; height: 72px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.chk-list { display: grid; gap: 6px; }
.chk-list .ok { color: var(--green); } .chk-list .bad { color: var(--red); }

/* ---------- एडमिन लेआउट ---------- */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.admin-topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; background: var(--navy-dark); color: #fff;
  padding: 10px 16px; position: sticky; top: 0; z-index: 30;
}
.admin-brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; min-width: 0; flex: 1; }
.admin-brand-title { font-weight: 700; font-size: 1.05rem; }
.admin-brand-sub { font-size: .8rem; color: #b9c8e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user { display: flex; align-items: center; gap: 8px; }
.admin-username { font-size: .9rem; display: none; }
.nav-toggle { background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; font-size: 1.3rem; border-radius: 8px; width: 42px; height: 42px; cursor: pointer; }
.admin-sidebar {
  background: var(--navy); color: #fff; display: none; flex-direction: column; justify-content: space-between;
  position: fixed; top: 62px; bottom: 0; left: 0; width: 260px; z-index: 25; overflow-y: auto; box-shadow: 4px 0 16px rgba(0,0,0,.2);
}
body.nav-open .admin-sidebar { display: flex; }
.admin-nav { display: flex; flex-direction: column; padding: 10px; }
.admin-nav a { color: #e3eaf7; text-decoration: none; padding: 10px 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.admin-nav a:hover { background: rgba(255,255,255,.1); }
.admin-nav a.active { background: var(--saffron); color: #fff; font-weight: 600; }
.nav-icon { width: 22px; text-align: center; }
.admin-sidebar-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; }
.admin-sidebar-foot a { color: #fff; text-decoration: none; }
.admin-sidebar-foot .muted { color: #9fb0d1; }
.admin-main { padding: 20px 16px 40px; min-width: 0; }
.admin-main h1 { font-size: 1.4rem; }
@media (min-width: 960px) {
  .admin-shell { grid-template-columns: 250px 1fr; }
  .admin-sidebar { display: flex; position: sticky; top: 62px; height: calc(100vh - 62px); box-shadow: none; }
  .admin-main { padding: 28px 28px 48px; }
  .nav-toggle { display: none; }
  .admin-username { display: inline; }
}
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); text-decoration: none; font-weight: 600; color: var(--navy); }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.upload-zone { border: 2px dashed #b9c8e6; border-radius: 12px; padding: 20px; text-align: center; background: #f8faff; }
.upload-zone .input { margin-top: 10px; }
.report-list { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: #fff; font-size: .9rem; }
.report-list div { padding: 3px 0; border-bottom: 1px dashed #eee; }
.report-list div:last-child { border-bottom: none; }
@media print {
  .site-header, .site-footer, .site-nav, .btn, .admin-sidebar, .admin-topbar, .tricolor { display: none !important; }
  .card { box-shadow: none; }
}
