:root {
  --navy: #0b1f3a;
  --navy-2: #122c4f;
  --saffron: #e87722;
  --saffron-2: #f09a4a;
  --green: #1a7a4c;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5c6b80;
  --line: #e2e8f0;
  --intl: #2563eb;
  --nat: #16a34a;
  --st: #c2410c;
  --danger: #c0392b;
  --shadow: 0 8px 24px rgba(11, 31, 58, 0.08);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans Devanagari", "Source Sans 3", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--navy); }
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--saffron), #ffb347);
  color: #1a1208; font-weight: 800; display: grid; place-items: center;
  letter-spacing: .5px;
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 11px; opacity: .7; }
.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav a {
  color: #d7e2f2; text-decoration: none; padding: 9px 12px; border-radius: 10px;
  font-size: 14px;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(232,119,34,.2); color: #fff; font-weight: 600; }
.nav-label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  opacity: .45; padding: 14px 12px 4px;
}
.sidebar-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
}
.who { font-size: 13px; opacity: .85; }
.logout { color: #ffd0b0; font-size: 13px; text-decoration: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px 8px;
}
.topbar h1 { margin: 0; font-size: 22px; }
.content { padding: 8px 28px 32px; }
.page-foot { padding: 8px 28px 20px; color: var(--muted); font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer;
  font: inherit; text-decoration: none; background: #e8edf4; color: var(--navy);
}
.btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--saffron); color: #1a1208; font-weight: 700; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-danger { background: #fde8e6; color: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.flash-success { background: #e8f7ee; color: #14532d; }
.flash-error { background: #fde8e6; color: #7f1d1d; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 4px; }
.stat.intl { border-top: 4px solid var(--intl); }
.stat.nat { border-top: 4px solid var(--nat); }
.stat.st { border-top: 4px solid var(--st); }
.stat.all { border-top: 4px solid var(--saffron); }

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 18px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top;
}
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.data tr:hover td { background: #fafbfd; }

.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-intl { background: #dbeafe; color: #1e40af; }
.badge-nat { background: #dcfce7; color: #166534; }
.badge-st { background: #ffedd5; color: #9a3412; }
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-pub { background: #ecfdf5; color: #047857; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=date], input[type=file],
select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 220px; resize: vertical; line-height: 1.55; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { max-width: 240px; }

/* Login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(232,119,34,.25), transparent),
    linear-gradient(160deg, #071525, #0b1f3a 50%, #123056);
}
.login-card {
  width: min(420px, 92vw); background: #fff; border-radius: 18px; padding: 32px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.login-card h1 { margin: 0 0 6px; font-size: 24px; }
.login-card p.lead { margin: 0 0 22px; color: var(--muted); }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 12px; margin-top: 6px; }
.hint { margin-top: 16px; font-size: 12px; color: var(--muted); background: #f6f8fb; padding: 10px 12px; border-radius: 10px; }

/* Public site */
.pub-top {
  background: var(--navy); color: #fff; padding: 18px 8%;
  display: flex; justify-content: space-between; align-items: center;
}
.pub-top a { color: #fff; text-decoration: none; }
.pub-hero { padding: 28px 8% 10px; }
.pub-hero h1 { margin: 0 0 6px; }
.tabs { display: flex; gap: 8px; padding: 10px 8% 0; flex-wrap: wrap; }
.tabs a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px;
}
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.news-grid { padding: 18px 8% 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-card {
  background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.news-card img { width: 100%; height: 150px; object-fit: cover; background: #dbe3ee; }
.news-card .body { padding: 14px 14px 16px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 { margin: 8px 0; font-size: 16px; line-height: 1.35; }
.news-card .sum { color: var(--muted); font-size: 13px; flex: 1; }
.article { max-width: 820px; margin: 0 auto; padding: 24px 20px 50px; }
.article img.hero { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; }
.article .meta { color: var(--muted); font-size: 13px; margin: 10px 0 18px; }
.article .body p { line-height: 1.7; }

/* Print */
@media print {
  .sidebar, .topbar, .page-foot, .no-print, .filters, .flash { display: none !important; }
  .app { display: block; }
  .main { width: 100%; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}

.print-sheet { max-width: 800px; margin: 0 auto; background: #fff; padding: 24px; }
.print-sheet header.ph {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 3px solid var(--navy); padding-bottom: 8px; margin-bottom: 16px;
}
.print-item { border-bottom: 1px dashed #ccc; padding: 12px 0; page-break-inside: avoid; }
.print-item h3 { margin: 4px 0 6px; font-size: 16px; }

@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sidebar { width: 210px; }
}
@media (max-width: 720px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}
