/* ============================================================
   IGP Amravati Range — admin panel stylesheet
   ============================================================ */
:root {
  --navy: #0b2a4a;
  --navy-2: #123b66;
  --navy-3: #08203a;
  --gold: #c9a227;
  --ink: #17233a;
  --muted: #64748b;
  --line: #dde5ef;
  --bg: #eef2f8;
  --green: #138808;
  --red: #b42318;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body.admin-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: #0f5aa0; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--navy); line-height: 1.3; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.admin-shell { display: flex; min-height: 100vh; }

/* ---------------- sidebar */
.admin-sidebar {
  width: 252px; flex: 0 0 252px; background: linear-gradient(180deg, #0b2a4a, #071c30);
  color: #cfe0f2; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column;
  overflow-y: auto; z-index: 90;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand img { width: 40px; height: 40px; }
.admin-brand strong { display: block; color: #fff; font-size: 13px; line-height: 1.35; }
.admin-brand span { display: block; font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #93aec7; margin-top: 2px; }
.admin-nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.admin-nav .nav-label { font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; color: #7089a2; padding: 15px 12px 5px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #c3d6e8; font-size: 13.5px; text-decoration: none; transition: background .12s ease;
}
.admin-nav a svg { width: 17px; height: 17px; opacity: .8; flex: 0 0 auto; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.admin-nav a.is-active { background: var(--gold); color: #0a1726; font-weight: 700; }
.admin-nav a.is-active svg { opacity: 1; }
.admin-nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.admin-sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 6px; }
.admin-sidebar-foot a { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #9fb8cf; padding: 7px 9px; border-radius: 6px; }
.admin-sidebar-foot a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }

/* ---------------- main */
.admin-main { margin-left: 252px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--line); padding: 11px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 60;
}
.admin-topbar .topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-topbar h1 { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-toggle { display: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px; cursor: pointer; color: var(--navy); }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.admin-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.admin-user .who { line-height: 1.25; }
.admin-user .who strong { display: block; color: var(--ink); font-size: 12.5px; }
.admin-user .who span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; }

/* language switch */
.lang-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: 5px; overflow: hidden; font-size: 11px; line-height: 1; }
.lang-switch a { padding: 5px 9px; color: #dbe8f4; text-decoration: none; font-weight: 600; }
.lang-switch a:hover { background: rgba(255,255,255,.14); text-decoration: none; color: #fff; }
.lang-switch a.is-active { background: var(--gold); color: #08203a; }
.lang-switch-admin { border-color: #c9d6e5; background: #fff; }
.lang-switch-admin a { color: #40506a; }
.lang-switch-admin a:hover { background: #eef4fb; color: #0b2a4a; }
.lang-switch-admin a.is-active { background: var(--navy); color: #fff; }
.lang-switch-admin a.is-active:hover { background: var(--navy); color: #fff; }
.admin-content { padding: 22px 24px 40px; width: 100%; max-width: 1440px; }

/* ---------------- alerts */
.alert { padding: 11px 15px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: #e8f7ee; border-color: #b7e4c7; color: #166534; }
.alert-error { background: #fdecec; border-color: #f5c2c2; color: #991b1b; }
.alert-warning { background: #fff8e6; border-color: #f7e0a3; color: #92400e; }
.alert-info { background: #eaf3fd; border-color: #c3ddf7; color: #1c4e80; }

/* ---------------- stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; display: flex; align-items: center; gap: 13px; }
.stat-icon { width: 44px; height: 44px; border-radius: 11px; background: #edf3fb; color: var(--navy); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-card .num { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.1; font-family: "Segoe UI", system-ui, sans-serif; }
.stat-card .lbl { font-size: 11.5px; color: var(--muted); }
.stat-card.is-alert .stat-icon { background: #fdecec; color: var(--red); }

/* ---------------- panels */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
.panel-head { padding: 13px 17px; border-bottom: 1px solid #eef2f8; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; margin: 0; }
.panel-head .sub { font-size: 11.5px; color: var(--muted); }
.panel-body { padding: 17px; }
.panel-body.p0 { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2;
  font-family: inherit; transition: .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: #1a1405; }
.btn-gold:hover { background: #d9b53a; }
.btn-outline { background: #fff; border-color: #c9d6e5; color: var(--navy); }
.btn-outline:hover { background: #f2f7fd; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #971b12; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.table th { text-align: left; padding: 10px 14px; background: #f6f9fd; color: #5b6b80; font-size: 10.5px; letter-spacing: .7px; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f9fbfe; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .title-cell { max-width: 430px; }
.table .title-cell strong { display: block; font-weight: 600; color: var(--ink); line-height: 1.45; }
.table .title-cell small { color: var(--muted); font-size: 11px; }
.table .nowrap { white-space: nowrap; }
.empty-row { text-align: center; padding: 34px 20px; color: var(--muted); }

/* ---------------- badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.badge-published, .badge-resolved, .badge-active { background: #e8f7ee; color: #166534; }
.badge-draft, .badge-inactive { background: #eef2f8; color: #5b6b80; }
.badge-new { background: #eaf3fd; color: #1c4e80; }
.badge-in_progress { background: #fff4dc; color: #8a5b00; }
.badge-rejected { background: #fdecec; color: #991b1b; }
.badge-cat { background: #eef4fb; color: #123b66; }
.badge-pinned { background: #fff3d6; color: #8a5b00; }

/* ---------------- forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; color: #2c3c54; }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cbd8e7; border-radius: 7px;
  font: inherit; font-size: 13px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-2); outline: 2px solid rgba(18,59,102,.13); }
.field .hint { font-size: 10.8px; color: var(--muted); }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #33445c; }
.check-line input { width: auto; }
.form-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef2f8; }
.form-group-title { grid-column: 1 / -1; font-size: 11px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 4px; }

/* ---------------- toolbar / filters */
.toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.toolbar input, .toolbar select { padding: 8px 10px; border: 1px solid #cbd8e7; border-radius: 7px; font: inherit; font-size: 12.5px; }
.toolbar input[type="search"], .toolbar input[type="text"] { min-width: 200px; flex: 1; }
.toolbar .spacer { flex: 1; }

/* ---------------- pagination */
.pagination { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.page-link { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #d8e3f0; border-radius: 6px; background: #fff; font-size: 12px; color: var(--navy); }
.page-link:hover { background: #eef4fb; text-decoration: none; }
.page-link.is-current { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 700; }
.page-dots { padding: 0 4px; color: #8896a9; }

/* ---------------- thumbnails */
.thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #eef2f8; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-item { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.photo-item img { width: 100%; height: 110px; object-fit: cover; display: block; background: #eef2f8; }
.photo-item .photo-meta { padding: 7px 9px; font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.photo-item .photo-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- chart */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.bar-col .bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, #1c5484, #0b2a4a); border-radius: 5px 5px 0 0; min-height: 3px; }
.bar-col .bar-label { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.bar-col .bar-value { font-size: 10px; font-weight: 700; color: var(--navy); }

/* ---------------- complaint detail */
.detail-list { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 13px; margin: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: var(--ink); font-weight: 600; word-break: break-word; }
.detail-box { background: #f8fafd; border: 1px dashed #d3e0ee; border-radius: 8px; padding: 12px 14px; font-size: 13px; white-space: pre-wrap; }

/* ---------------- login */
.login-wrap {
  position: relative; min-height: 100vh; display: grid; place-items: center; padding: 28px; overflow: hidden;
  background:
    radial-gradient(700px 420px at 12% 8%, rgba(124, 58, 237, .3), transparent 65%),
    radial-gradient(760px 460px at 92% 100%, rgba(6, 182, 212, .22), transparent 64%),
    linear-gradient(135deg, #06182b 0%, #0b2a4a 48%, #071c30 100%);
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px);
}
.login-wrap::before { width: 340px; height: 340px; left: -120px; bottom: -140px; border: 1px solid rgba(201, 162, 39, .28); }
.login-wrap::after { width: 480px; height: 480px; right: -180px; top: -200px; border: 1px solid rgba(255, 255, 255, .14); }
.login-shell {
  position: relative; z-index: 1; width: 100%; max-width: 1000px;
  display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden;
  background: #fff; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .42);
}
.login-visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 38px 38px 30px; color: #fff;
  background: linear-gradient(150deg, #071c30 0%, #0b2a4a 55%, #123b66 100%);
}
.login-visual::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(201, 162, 39, .22), transparent 68%),
    radial-gradient(380px 300px at 0% 100%, rgba(6, 182, 212, .18), transparent 70%);
}
.login-visual > * { position: relative; z-index: 1; }
.login-visual-top { display: flex; align-items: center; gap: 12px; }
.login-visual-top img { width: 50px; height: 50px; flex: 0 0 auto; }
.login-visual-top strong { display: block; font-size: 15px; line-height: 1.3; color: #fff; }
.login-visual-top span { display: block; margin-top: 3px; font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; color: #a9c4dc; }
.login-eyebrow {
  display: inline-block; margin-top: 34px; font-size: 10px; font-weight: 800;
  letter-spacing: 2.4px; text-transform: uppercase; color: #e2c46a;
}
.login-visual h2 {
  margin: 12px 0 10px; max-width: 390px; color: #fff;
  font-family: "Noto Serif Devanagari", Georgia, serif; font-size: 30px; line-height: 1.22;
}
.login-visual p { max-width: 375px; margin: 0; color: #bcd2e8; font-size: 13px; line-height: 1.7; }
.login-points { display: grid; gap: 9px; margin: 24px 0 0; padding: 0; list-style: none; }
.login-points li { display: flex; align-items: flex-start; gap: 9px; color: #dbe8f4; font-size: 12.5px; }
.login-points li::before {
  content: "✓"; width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
  color: #0b2a4a; background: linear-gradient(135deg, #e2c46a, #c9a227);
}
.login-visual-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 30px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .14); color: #8fb0cc; font-size: 10.5px; letter-spacing: .3px;
}
.login-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 38px 40px 28px; background: #fff; }
.login-body { padding: 0; }
.login-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.login-kicker { font-size: 10px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; color: #8a6d1d; }
.login-body h2 { margin: 0 0 4px; font-size: 26px; color: #0b2a4a; }
.login-body p.sub { margin: 0 0 22px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.login-body .field { margin-bottom: 14px; }
.login-body .field label { font-size: 12.5px; }
.login-body .field input { padding: 11px 13px; border-radius: 9px; font-size: 14px; background: #fbfcfe; }
.login-body .field input:focus { background: #fff; }
.login-body .btn-primary {
  width: 100%; padding: 12px 16px; border-radius: 9px; font-size: 14px;
  background: linear-gradient(135deg, #0b2a4a, #16436e); box-shadow: 0 10px 24px rgba(11, 42, 74, .2);
}
.login-body .btn-primary:hover { background: linear-gradient(135deg, #123b66, #1c5484); }
.login-security {
  display: flex; gap: 7px; align-items: flex-start; margin: 18px 0 0; padding-top: 15px;
  border-top: 1px solid #eef2f8; color: #7b8a9e; font-size: 10.5px; line-height: 1.55;
}
.login-foot { padding: 18px 0 0; text-align: center; font-size: 11px; color: var(--muted); }
.login-foot a { color: var(--navy); font-weight: 600; }
@media (max-width: 820px) {
  .login-wrap { padding: 18px; }
  .login-shell { grid-template-columns: 1fr; max-width: 470px; border-radius: 20px; }
  .login-visual { padding: 24px 26px 20px; }
  .login-visual h2 { margin: 10px 0 0; font-size: 21px; }
  .login-visual p, .login-points, .login-visual-foot { display: none; }
  .login-eyebrow { margin-top: 20px; }
  .login-card { padding: 28px 26px 24px; }
  .login-topline { margin-bottom: 14px; }
  .login-body h2 { font-size: 23px; }
}
@media (max-width: 460px) {
  .login-wrap { padding: 12px; }
  .login-shell { border-radius: 16px; }
  .login-visual { padding: 20px 20px 16px; }
  .login-visual h2 { font-size: 18px; }
  .login-card { padding: 24px 20px 20px; }
  .login-body h2 { font-size: 21px; }
  .login-topline { flex-wrap: wrap; }
}

/* ---------------- misc */
.section-title-sm { font-size: 13px; margin: 0 0 10px; color: var(--navy); }
.text-muted { color: var(--muted); font-size: 12px; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.quick-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.notice-box { background: #fff8e6; border: 1px solid #f7e0a3; color: #7a4b00; border-radius: 9px; padding: 12px 14px; font-size: 12.5px; }
.divider { height: 1px; background: #eef2f8; margin: 16px 0; }

/* ---------------- responsive */
@media (max-width: 1200px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.sidebar-open .admin-sidebar { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .admin-content { padding: 18px 16px 32px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .stat-cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-topbar { padding: 10px 14px; }
  .admin-user .who { display: none; }
  .detail-list { grid-template-columns: 1fr; gap: 3px; }
  .detail-list dd { margin-bottom: 8px; }
  .table .title-cell { max-width: 220px; }
}
