/* NADA IMS — Government of India visual language */
:root {
  --saffron: #FF9933;
  --white: #ffffff;
  --green: #138808;
  --navy: #0a2540;
  --navy-2: #123056;
  --ink: #1a2332;
  --gold: #c5a572;
  --paper: #f4f1ea;
  --panel: #ffffff;
  --line: #cfc7b8;
  --muted: #5c6570;
  --danger: #8b1e1e;
  --ok: #1b5e20;
  --warn: #9a6b12;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans", "Segoe UI", "Source Sans 3", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

a { color: #0b3d91; text-decoration: none; }
a:hover { text-decoration: underline; }

.tricolor { height: 6px; background: linear-gradient(90deg, var(--saffron) 0 33.33%, #fff 33.33% 66.66%, var(--green) 66.66%); }

.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 22px;
  font-size: 12px;
  letter-spacing: .04em;
}
.topbar span { opacity: .9; }

.gov-header {
  background: linear-gradient(180deg, #fff 0%, #f7f4ee 100%);
  border-bottom: 3px solid var(--navy);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
}
.emblem { width: 64px; height: 64px; flex-shrink: 0; }
.gov-header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .02em;
  color: var(--navy);
  font-weight: 700;
}
.gov-header .hi { margin: 2px 0 0; font-size: 13px; color: #4a3728; }
.gov-header .sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.nav {
  background: var(--navy-2);
  display: flex;
  flex-wrap: wrap;
  padding: 0 10px;
}
.nav a {
  color: #e8eef6;
  padding: 11px 14px;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a.active {
  background: #0a2540;
  border-bottom-color: var(--saffron);
  text-decoration: none;
}

.wrap { max-width: 1400px; margin: 0 auto; padding: 18px 22px 40px; }

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.page-title h2 { margin: 0; font-size: 22px; color: var(--navy); }
.page-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff !important;
  border: 0;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none !important;
  border-radius: 2px;
}
.btn:hover { background: #071a2e; }
.btn.gold { background: #7a5b2a; }
.btn.green { background: var(--green); }
.btn.red { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--navy) !important; border: 1px solid var(--navy); }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) {
  .g-4, .g-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .g-4, .g-3, .g-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(10,37,64,.04);
}
.card h3 {
  margin: 0;
  padding: 10px 14px;
  background: #eef2f7;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy);
}
.card .body { padding: 14px; }

.kpi { text-align: left; }
.kpi .n { font-size: 28px; font-weight: 700; color: var(--navy); }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi.crit .n { color: var(--danger); }
.kpi.high .n { color: #b45309; }

table.gov {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
table.gov th {
  background: #123056;
  color: #fff;
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
}
table.gov td { padding: 8px 10px; border-bottom: 1px solid #e6e0d4; vertical-align: top; }
table.gov tr:nth-child(even) td { background: #faf8f4; }
table.gov tr:hover td { background: #fff4e5; }

.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .06em;
  padding: 3px 7px;
  border-radius: 2px;
  font-weight: 700;
}
.cls-secret { background: #4a0000; color: #fff; }
.cls-confidential { background: #7a1f1f; color: #fff; }
.cls-restricted { background: #7a5b2a; color: #fff; }
.cls-unclassified { background: #445566; color: #fff; }
.st-open { background: #0b3d91; color: #fff; }
.st-inv { background: #5b3d8f; color: #fff; }
.st-act { background: #9a6b12; color: #fff; }
.st-closed { background: #1b5e20; color: #fff; }
.st-arch { background: #555; color: #fff; }
.st-high { background: #b45309; color: #fff; }
.st-crit { background: #8b1e1e; color: #fff; }
.st-med { background: #0b3d91; color: #fff; }
.st-low { background: #1b5e20; color: #fff; }

.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #b7b1a4;
  font: inherit;
  background: #fff;
}
.form-row textarea { min-height: 90px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .cols, .cols-3 { grid-template-columns: 1fr; } }

.flash { padding: 10px 14px; margin-bottom: 14px; border-left: 4px solid; font-size: 14px; }
.flash.ok { background: #e8f5e9; border-color: var(--ok); }
.flash.err { background: #fdecea; border-color: var(--danger); }
.flash.warn { background: #fff8e1; border-color: var(--warn); }

.lifecycle {
  display: flex;
  gap: 0;
  overflow-x: auto;
  margin: 8px 0 18px;
}
.lifecycle .step {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 10px 6px;
  background: #dfe6ee;
  color: #334;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  position: relative;
  font-weight: 700;
}
.lifecycle .step.done { background: #1b5e20; color: #fff; }
.lifecycle .step.current { background: var(--saffron); color: #1a1208; }
.lifecycle .step + .step::before {
  content: "";
  position: absolute;
  left: -8px; top: 0; bottom: 0;
  width: 0; height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
}

.dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; }
.dl dd { margin: 0; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0a2540;
}
.login-card {
  width: 440px;
  max-width: calc(100% - 32px);
  margin: 40px auto;
  background: #fff;
  border-top: 6px solid var(--saffron);
}
.login-card .inner { padding: 22px; }
.login-foot { color: #c9d3df; text-align: center; font-size: 12px; padding: 20px; }

.gov-footer {
  background: var(--navy);
  color: #c9d3df;
  padding: 16px 22px;
  font-size: 12px;
  margin-top: 24px;
}
.gov-footer strong { color: #fff; }

.pager-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}
.pager-info { color: var(--muted); }
.pager { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pager a, .pager span {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
  background: #fff;
}
.pager a:hover { background: #fff4e5; text-decoration: none; }
.pager span.current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager span.disabled { color: #9aa3ad; background: #f3f1ec; }


.filters { background: #fff; border: 1px solid var(--line); padding: 12px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.stamp {
  border: 2px solid var(--danger);
  color: var(--danger);
  display: inline-block;
  padding: 4px 10px;
  font-weight: 800;
  letter-spacing: .12em;
  transform: rotate(-6deg);
  font-size: 12px;
}

.timeline { border-left: 3px solid var(--navy); margin-left: 8px; padding-left: 16px; }
.timeline .ev { margin-bottom: 14px; }
.timeline .ev .t { font-size: 11px; color: var(--muted); }
.timeline .ev .h { font-weight: 700; }

.userchip { font-size: 12px; }
.userchip b { color: #fff; }

.warn-banner {
  background: #3b0a0a;
  color: #f3d2d2;
  text-align: center;
  font-size: 11px;
  letter-spacing: .14em;
  padding: 4px;
  font-weight: 700;
}
