.is-admin #site-nav, .is-admin #site-footer { display: none; }
.is-admin body, body.is-admin { background: var(--soft); }
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--maroon-deep); color: #F3E6DA; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.2rem 0; display: flex; flex-direction: column; }
.side-brand { display: block; padding: 0 1.2rem 1.2rem; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .12); margin-bottom: .8rem; }
.side-brand-identity { display: flex; align-items: center; gap: .65rem; margin-bottom: .45rem; }
.side-brand-identity .logo { width: 36px; height: 36px; flex: none; background: #fff; }
.side-brand strong { display: block; min-width: 0; font: 600 1.05rem/1.15 'Cormorant Garamond', Georgia, serif; } .side-brand small { opacity: .75; font-size: .75rem; }
.side-nav { display: flex; flex-direction: column; flex: 1; }
.side-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.2rem; min-height: 44px; color: #F3E6DA; text-decoration: none; border: 0; border-left: 4px solid transparent; background: none; font: 500 .95rem var(--head); cursor: pointer; width: 100%; text-align: left; }
.side-item:hover { background: rgba(255, 255, 255, .08); padding-left: 1.4rem; }
.side-item.active { background: rgba(255, 255, 255, .14); border-left-color: var(--saffron); color: #fff; }
.side-logout { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .12); }
.admin-main { padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.3rem; }
.admin-head-extra { display: flex; align-items: center; gap: .5rem; }
.admin-head-extra .btn-sm { min-height: 36px; padding: .35rem .75rem; }
.admin-head-extra .btn-sm .ic { width: 14px; height: 14px; }
.admin-head h1 { font-size: 1.7rem; margin: 0; color: var(--maroon-deep); } .admin-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.stat-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1.2rem; }
.stat-box { display: flex; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.stat-box > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #F7E6E8; color: var(--maroon); flex: none; }
.stat-box strong { display: block; font: 700 1.7rem var(--head); line-height: 1.1; color: var(--maroon-deep); } .stat-box small { color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; margin-bottom: 1.2rem; }
.panel h2 { font-size: 1.2rem; } .panel-head { display: flex; justify-content: space-between; align-items: center; }
.chart { width: 100%; height: auto; display: block; }
.toolbar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1rem; } .toolbar .chips { margin: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: .9rem; } .pager > div { display: flex; gap: .6rem; align-items: center; }
.svc-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.svc-admin { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem; } .svc-admin.off { opacity: .6; }
.svc-admin h3 { margin: 0; font-size: 1rem; } .svc-admin small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; } .svc-admin > div:nth-child(2) { flex: 1; min-width: 120px; }
.scheme-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.scheme-admin { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .9rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.scheme-admin.off { opacity: .6; }
.scheme-admin-image { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.scheme-admin-placeholder { display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.scheme-admin-info { flex: 1; min-width: 150px; }
.scheme-admin-info h3 { margin: 0; font-size: 1rem; }
.scheme-admin-info p { margin: .2rem 0; color: var(--muted); font-size: .82rem; }
.scheme-admin-info small { color: var(--muted); }
.scheme-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem .9rem; }
.scheme-image-preview { min-height: 90px; display: grid; place-items: center; margin: .5rem 0 1rem; color: var(--muted); background: var(--soft); border-radius: 10px; }
.scheme-image-preview img { max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; }
.scheme-form-grid input[type="file"] { width: 100%; padding: .55rem; }
.download-form-upload { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .9rem; align-items: end; }
.download-form-upload .field { margin-bottom: .7rem; }
.download-form-upload .field span { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.download-form-upload input[type="file"] { padding: .5rem; }
.download-form-upload > button { justify-self: start; margin-bottom: .7rem; }
.ad-interval-form { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; }
.ad-interval-form .field { min-width: 180px; margin-bottom: .7rem; }
.ad-interval-form .field span { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.upload-form { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: .6rem 0; } .upload-form select { width: auto; min-width: 200px; } .upload-form input[type="file"] { width: auto; flex: 1; min-width: 180px; padding: .5rem; }
.ad-upload-form { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; }
.ad-upload-form .field { flex: 1; min-width: 220px; margin-bottom: .7rem; }
.ad-upload-form .field span { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.ad-upload-form input[type="file"] { width: 100%; padding: .5rem; }
.ad-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.ad-admin-card { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ad-admin-card img { width: 88px; height: 60px; flex: none; object-fit: contain; border-radius: 7px; background: var(--soft); }
.ad-admin-info { flex: 1; min-width: 0; }
.ad-admin-info strong { display: block; overflow-wrap: anywhere; font-size: .85rem; }
.ad-admin-info small { color: var(--muted); font-size: .75rem; }
@media (max-width: 860px) {
  /* Sidebar upar ek scrollable tab bar ban jata hai */
  .admin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { position: static; height: auto; padding: .6rem 0 0; }
  .side-brand { padding: 0 1rem .6rem; margin-bottom: 0; border: 0; }
  .side-nav { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .side-item { width: auto; flex: none; white-space: nowrap; border-left: 0; border-bottom: 4px solid transparent; padding: .7rem 1rem; }
  .side-item:hover { padding-left: 1rem; } .side-item.active { border-bottom-color: var(--saffron); }
  .side-logout { margin-top: 0; border-top: 0; }
}
@media (max-width: 640px) {
  .admin-main { padding: .9rem .75rem 1.5rem; }
  .side-brand { padding: 0 .85rem .5rem; }
  .side-brand-identity { gap: .5rem; margin-bottom: .3rem; }
  .side-brand-identity .logo { width: 30px; height: 30px; }
  .side-brand strong { font-size: 1rem; }
  .side-brand small { font-size: .68rem; }
  .side-nav { gap: .1rem; padding: 0 .4rem; }
  .side-item { gap: .4rem; min-height: 40px; padding: .5rem .65rem; font-size: .8rem; border-bottom-width: 3px; }
  .side-item:hover { padding-left: .65rem; }
  .side-item .ic { width: 15px; height: 15px; }
  .admin-head { gap: .65rem; margin-bottom: .9rem; }
  .admin-head h1 { font-size: 1.4rem; }
  .admin-head p { font-size: .8rem; }
  .admin-head-extra { gap: .35rem; }
  .admin-head-extra .btn-sm { min-height: 32px; padding: .3rem .55rem; font-size: .8rem; }
  .stat-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: .85rem; }
  .stat-box { gap: .55rem; padding: .7rem; border-radius: 10px; }
  .stat-box > div { min-width: 0; }
  .stat-box > span { width: 32px; height: 32px; border-radius: 8px; }
  .stat-box > span .ic { width: 17px; height: 17px; }
  .stat-box strong { font-size: 1.3rem; }
  .stat-box small { font-size: .72rem; }
  .panel { padding: .85rem; margin-bottom: .85rem; }
  .panel h2 { font-size: 1.05rem; }
  .svc-admin-grid, .scheme-admin-grid { grid-template-columns: 1fr; }
  .svc-admin, .scheme-admin { gap: .6rem; padding: .7rem; }
  .scheme-admin-image { width: 44px; height: 44px; }
  .scheme-admin-info { min-width: 0; }
  .enquiry-table tr.clickable { padding: .5rem .7rem; }
  .enquiry-table td[data-l="नाम"] { color: var(--maroon-deep); font-weight: 600; }
  .enquiry-table td[data-l="संदेश"] { align-items: flex-start; }
  .enquiry-table td.clip { max-width: none; overflow: visible; text-align: left; white-space: normal; }
  .enquiry-table td.clip span { display: -webkit-box; flex: 1; min-width: 0; max-width: 65%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .applications-table .actions { gap: .5rem; }
  .applications-table .actions .icon-btn.round { min-width: 40px; min-height: 40px; }
  .applications-table .actions .ic { width: 18px; height: 18px; }
  .admin-file-list .table tr { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; padding: .25rem .5rem; }
  .admin-file-list .table td { display: block; padding: .2rem 0; border: 0; text-align: left; }
  .admin-file-list .table td::before { content: none; }
  .admin-file-list .table td.clip { flex: 1; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-file-list .table td.actions { display: flex; flex: none; justify-content: flex-end; }
  .ad-admin-grid { grid-template-columns: 1fr; gap: .5rem; }
  .ad-admin-card { gap: .55rem; padding: .55rem; }
  .ad-admin-card img { width: 72px; height: 52px; }
  .scheme-form-grid { grid-template-columns: 1fr; }
  .download-form-upload { grid-template-columns: 1fr; }
}
