/* Mobile Application UI Stylesheet (NyaySetu) */

/* Desktop defaults: hide mobile-only elements */
.mobile-app-bar {
  display: none;
}

.mobile-skyline-hero {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-overflow-menu {
  display: none;
}

.hidden-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.req-star {
  color: #e53e3e;
  font-weight: 700;
  margin-left: 2px;
}

/* Feature Badges Row (3 cards) */
.feature-badges-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.feature-badge-card {
  background: var(--surface, #ffffff);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-badge-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.feature-badge-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #102a43);
}

.feature-badge-text small {
  display: block;
  font-size: 11px;
  color: var(--muted, #627d98);
  margin-top: 1px;
}

/* Input icon wrappers */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon .input-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #627d98);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-icon .input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #829ab1);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-icon input,
.input-with-icon select {
  padding-left: 38px !important;
  height: 42px;
  border-radius: 9px;
  font-size: 13.5px;
  border: 1px solid var(--border, #cfdceb);
  background: var(--surface, #ffffff);
  color: var(--text, #102a43);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-with-icon select {
  padding-right: 34px !important;
  appearance: none;
  -webkit-appearance: none;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
  border-color: #1877f2;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

/* Segmented Search-By Tabs */
.search-by-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.tab-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border-radius: 9px;
  border: 1px solid var(--border, #d9e2ec);
  background: var(--surface, #ffffff);
  color: var(--text, #334e68);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-pill:hover {
  background: var(--bg-hover, #f0f4f8);
}

.tab-pill.active {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.35);
}

.tab-pill .svg-icon {
  width: 16px;
  height: 16px;
}

.search-submit-btn {
  height: 46px;
  border-radius: 10px;
  background: #1877f2;
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
  transition: background 0.15s ease, transform 0.1s ease;
}

.search-submit-btn:hover {
  background: #1264cb;
}

.search-submit-btn:active {
  transform: scale(0.99);
}

.search-submit-btn .svg-icon {
  width: 18px;
  height: 18px;
}

.search-submit-btn:disabled,
.search-submit-btn.disabled {
  background: #94a3b8 !important;
  color: #f1f5f9 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 0.65 !important;
  transform: none !important;
}

.search-submit-btn.loading {
  background: #1264cb !important;
  color: #ffffff !important;
  cursor: wait !important;
  opacity: 0.92 !important;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.25) !important;
}

body.dark .search-submit-btn:disabled,
body.dark .search-submit-btn.disabled {
  background: #334e68 !important;
  color: #829ab1 !important;
  opacity: 0.65 !important;
}

/* Enhanced Recent Searches Card */
.recent-card {
  background: var(--surface, #ffffff);
  border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-top: 16px;
}

.recent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #f0f4f8);
}

.recent-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-title-wrap h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #102a43);
}

.recent-title-wrap .svg-icon {
  color: #1877f2;
}

.recent-view-all {
  background: none;
  border: none;
  color: #1877f2;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.recent-view-all:hover {
  background: rgba(24, 119, 242, 0.08);
}

.recent-card-list {
  display: flex;
  flex-direction: column;
}

.recent-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border, #f0f4f8);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.recent-card-item:last-child {
  border-bottom: none;
}

.recent-card-item:hover {
  background: var(--bg-hover, #f8fafc);
}

.recent-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e7f5ff;
  color: #1877f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recent-item-copy {
  flex: 1;
  min-width: 0;
}

.recent-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #102a43);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-sub {
  font-size: 12px;
  color: var(--muted, #627d98);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--muted, #829ab1);
  font-size: 12px;
}

.recent-item-end .svg-icon {
  color: #9fb3c8;
}

/* ================================================================
   Mobile Specific Styles (Screens <= 900px)
   ================================================================ */
@media (max-width: 900px) {
  /* Hide standard desktop topbar */
  .topbar {
    display: none !important;
  }

  /* Mobile Blue App Bar */
  .mobile-app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0b5299 0%, #0d5ea8 100%);
    color: #ffffff;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .mobile-app-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-app-shield {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
  }

  .mobile-app-shield .svg-icon {
    width: 34px;
    height: 34px;
    stroke-width: 2.2;
  }

  .mobile-app-titles h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.2px;
  }

  .mobile-app-titles p {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #d0e2ff;
    font-weight: 400;
    line-height: 1.2;
  }

  .mobile-app-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
  }

  .slogan-badge-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .slogan-badge-text {
    font-size: 11.5px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.1px;
    white-space: nowrap;
  }

  .tricolor-wave {
    height: 3px;
    width: 100%;
    max-width: 140px;
    border-radius: 2px;
    margin-top: 3px;
    background: linear-gradient(90deg, #FF9933 0%, #FF9933 33%, #FFFFFF 33%, #FFFFFF 66%, #138808 66%, #138808 100%);
  }

  .mobile-menu-dots-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
  }

  .mobile-menu-dots-btn:hover,
  .mobile-menu-dots-btn:active {
    background: rgba(255, 255, 255, 0.15);
  }

  .mobile-menu-dots-btn .svg-icon {
    width: 22px;
    height: 22px;
  }

  .mobile-overflow-menu {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 110;
    min-width: 178px;
    padding: 6px;
    border: 1px solid rgba(15, 63, 111, 0.16);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(5, 35, 67, 0.2);
  }

  .mobile-overflow-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 12px;
    width: 9px;
    height: 9px;
    border-top: 1px solid rgba(15, 63, 111, 0.16);
    border-left: 1px solid rgba(15, 63, 111, 0.16);
    background: #ffffff;
    transform: rotate(45deg);
  }

  .mobile-overflow-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #163a63;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
  }

  .mobile-overflow-item:hover,
  .mobile-overflow-item:focus-visible {
    outline: none;
    background: #e9f3ff;
    color: #0b5299;
  }

  /* Mobile Skyline Hero */
  .mobile-skyline-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eef5fc url('../assets/bihar-skyline.png') right 4px bottom no-repeat;
    background-size: auto 68px;
    padding: 14px 14px 16px 14px;
    border-bottom: 1px solid rgba(11, 82, 153, 0.1);
    position: relative;
  }

  .skyline-text-wrap {
    max-width: 68%;
  }

  .skyline-text-wrap h2 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: #102a43;
    line-height: 1.25;
  }

  .skyline-text-wrap p {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #486581;
  }

  .skyline-motto-wrap {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }

  .skyline-motto-text {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #243b53;
    text-transform: uppercase;
    text-align: right;
    line-height: 1.1;
  }

  .motto-tricolor {
    height: 2px;
    width: 44px;
    border-radius: 1px;
    background: linear-gradient(90deg, #FF9933 0%, #FF9933 33%, #FFFFFF 33%, #FFFFFF 66%, #138808 66%, #138808 100%);
  }

  /* Hide desktop hero on mobile */
  .hero-card {
    display: none !important;
  }

  /* Search Card inside Mobile */
  .search-card {
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }

  .search-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
  }

  .search-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .search-card-title-wrap h2 {
    margin: 0;
    font-size: 18.5px;
    font-weight: 700;
    color: var(--text, #102a43);
  }

  .search-card-subnote {
    font-size: 11px;
    color: var(--muted, #829ab1);
    text-align: right;
    max-width: 130px;
    line-height: 1.2;
  }

  /* Grid on mobile: District & Police Station 2 cols, Dates 2 cols, rest full width */
  .search-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .search-by-field,
  .query-field,
  .section-field {
    grid-column: span 2 !important;
  }

  .form-actions {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 10px;
    margin-top: 14px;
  }

  .search-submit-btn {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    font-size: 16px;
  }

  /* 3 Feature Badges on Mobile */
  .feature-badges-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin: 14px 0 !important;
  }

  .feature-badge-card {
    padding: 10px 8px;
    gap: 8px;
    border-radius: 12px;
  }

  .feature-badge-card .icon-badge {
    width: 32px;
    height: 32px;
  }

  .feature-badge-card .icon-badge .svg-icon {
    width: 17px;
    height: 17px;
  }

  .feature-badge-text strong {
    font-size: 11px;
    line-height: 1.15;
  }

  .feature-badge-text small {
    font-size: 9.5px;
    line-height: 1.15;
  }

  /* Mobile Search Results Layout (exact match to mockup) */
  .desktop-only-toolbar {
    display: none !important;
  }

  .desktop-table-wrap {
    display: none !important;
  }

  .results-cards,
  .results-cards.hidden {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .results-header-card {
    padding: 14px;
    border-radius: 14px;
  }

  .results-header-title-wrap h2 {
    font-size: 17px;
  }

  .result-card {
    padding: 13px 14px;
    border-radius: 14px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  .card-fir-title {
    font-size: 15px;
  }

  .result-card-body {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .card-meta-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .meta-row {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .meta-label {
    width: 84px;
    font-size: 12px;
  }

  .meta-val {
    font-size: 12px;
    min-width: 0;
  }

  .card-action-stack {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 4px;
    box-sizing: border-box !important;
  }

  .card-btn-view,
  .card-btn-download {
    flex: 1 1 0% !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 11.5px !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-btn-view .svg-icon,
  .card-btn-download .svg-icon {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
  }

  .results-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .results-footer p {
    text-align: center;
    font-size: 11px;
    margin: 0;
  }

  .pagination {
    max-width: 100%;
    overflow-x: auto;
    justify-content: center;
    padding: 2px 0;
  }

  /* Fixed Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    z-index: 990;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: #627d98;
    font-size: 10.5px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding: 6px 0 8px 0;
    transition: color 0.15s ease;
  }

  .bottom-nav-item .svg-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
  }

  .bottom-nav-item.active {
    color: #1877f2;
    font-weight: 700;
  }

  .bottom-nav-item.active .svg-icon {
    stroke-width: 2.3;
  }

  .bottom-nav-item.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    width: 32px;
    height: 3px;
    background: #1877f2;
    border-radius: 2px;
  }

  /* Content and footer layout on mobile */
  .content {
    padding: 12px 12px 24px 12px;
  }

  .footer {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 24px !important;
    padding: 10px 14px 74px 14px !important; /* clearance for mobile bottom nav */
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 10px;
  }

  .footer-logo {
    height: 22px;
    max-width: 100px;
  }
}

/* ================================================================
   Dark Theme Adjustments
   ================================================================ */
body.dark .mobile-app-bar {
  background: linear-gradient(135deg, #09345e 0%, #0c4377 100%);
}

body.dark .mobile-overflow-menu,
body.dark .mobile-overflow-menu::before {
  border-color: #294a6b;
  background: #102a43;
}

body.dark .mobile-overflow-item {
  color: #d9eafc;
}

body.dark .mobile-overflow-item:hover,
body.dark .mobile-overflow-item:focus-visible {
  background: #163b61;
  color: #ffffff;
}

body.dark .mobile-skyline-hero {
  background: #0d1f33 url('../assets/bihar-skyline.png') right 4px bottom no-repeat;
  background-size: auto 68px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark .skyline-text-wrap h2 {
  color: #f0f4f8;
}

body.dark .skyline-text-wrap p {
  color: #9fb3c8;
}

body.dark .skyline-motto-text {
  color: #bcccdc;
}

body.dark .tab-pill {
  background: #102a43;
  border-color: #243b53;
  color: #d9e2ec;
}

body.dark .tab-pill:hover {
  background: #1e3a5f;
}

body.dark .tab-pill.active {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
}

body.dark .feature-badge-card {
  background: #102a43;
  border-color: #243b53;
}

body.dark .feature-badge-text strong {
  color: #f0f4f8;
}

body.dark .feature-badge-text small {
  color: #9fb3c8;
}

body.dark .recent-card {
  background: #102a43;
  border-color: #243b53;
}

body.dark .recent-card-head {
  border-bottom-color: #243b53;
}

body.dark .recent-title-wrap h3 {
  color: #f0f4f8;
}

body.dark .recent-card-item {
  border-bottom-color: #243b53;
}

body.dark .recent-card-item:hover {
  background: #163659;
}

body.dark .recent-item-icon {
  background: rgba(24, 119, 242, 0.2);
  color: #60a5fa;
}

body.dark .recent-item-title {
  color: #f0f4f8;
}

body.dark .recent-item-sub {
  color: #9fb3c8;
}

body.dark .mobile-bottom-nav {
  background: #0a192f;
  border-top-color: #1e3a5f;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}

body.dark .bottom-nav-item {
  color: #829ab1;
}

body.dark .bottom-nav-item.active {
  color: #60a5fa;
}

body.dark .bottom-nav-item.active::after {
  background: #60a5fa;
}

body.dark .results-header-card {
  background: #102a43;
  border-color: #243b53;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.dark .results-header-title-wrap h2 {
  color: #f0f4f8;
}

body.dark .edit-search-btn {
  background: #163659;
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark .edit-search-btn:hover {
  background: #1c4573;
}

body.dark .results-summary-text {
  color: #9fb3c8;
}

body.dark .results-summary-text strong {
  color: #f0f4f8;
}

body.dark .results-summary-context {
  color: #9fb3c8;
}

body.dark .filter-chips-row {
  border-top-color: #243b53;
}

body.dark .filter-chip {
  background: #163659;
  border-color: #243b53;
  color: #60a5fa;
}

body.dark .filter-chip-icon {
  color: #60a5fa;
}

body.dark .filter-chip-dismiss {
  color: #60a5fa;
}

body.dark .filter-chip-dismiss:hover {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}

body.dark .clear-all-chips-btn {
  color: #60a5fa;
}

body.dark .result-card {
  background: #102a43;
  border-color: #243b53;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .result-card:hover {
  border-color: #334e68;
}

body.dark .card-fir-icon-badge {
  background: rgba(24, 119, 242, 0.25);
  color: #60a5fa;
}

body.dark .card-fir-title {
  color: #f0f4f8;
}

body.dark .card-date-badge {
  color: #9fb3c8;
}

body.dark .card-date-badge:hover {
  background: #163659;
  color: #60a5fa;
}

body.dark .card-date-badge .svg-icon {
  color: #829ab1;
}

body.dark .meta-icon {
  color: #829ab1;
}

body.dark .meta-label {
  color: #9fb3c8;
}

body.dark .meta-colon {
  color: #627d98;
}

body.dark .meta-val {
  color: #f0f4f8;
}

body.dark .card-btn-view {
  background: #163659;
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark .card-btn-view:hover {
  background: #1c4573;
}

body.dark .card-btn-download:disabled {
  background: #334e68;
  border-color: #334e68;
  color: #829ab1;
}

body.dark .skeleton-box,
body.dark .skeleton-line {
  background: linear-gradient(90deg, #163659 25%, #243b53 50%, #163659 75%);
  background-size: 200% 100%;
}

/* ================================================================
   Dedicated FIR Details View (media_1789328495324.png)
   ================================================================ */
#view-fir-details {
  padding-bottom: 70px;
}

.details-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eef5fc url('../assets/bihar-skyline.png') right 4px bottom no-repeat;
  background-size: auto 64px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(11, 82, 153, 0.1);
  margin-bottom: 16px;
}

.details-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #1877f2;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.details-back-btn:hover {
  color: #1264cb;
  background: rgba(24, 119, 242, 0.08);
}

.details-back-btn .svg-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.details-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.details-header-copy h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text, #0f172a);
  letter-spacing: -0.3px;
}

.details-header-copy p {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--muted, #627d98);
}

.verified-record-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #edfbf2;
  border: 1px solid #bbf2cd;
  border-radius: 12px;
  padding: 7px 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.verified-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.verified-icon .svg-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.verified-text strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  line-height: 1.2;
}

.verified-text small {
  display: block;
  font-size: 10px;
  color: #065f46;
  line-height: 1.2;
  margin-top: 1px;
}

.details-cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 74px;
}

.details-section-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.details-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.details-card-head .svg-icon {
  width: 18px;
  height: 18px;
  color: #1877f2;
}

.details-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #0f172a);
  letter-spacing: -0.2px;
}

.details-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.details-field-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.field-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e7f5ff;
  color: #1877f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.field-icon-badge .svg-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.field-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.field-label {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-weight: 500;
}

.field-value {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text, #0f172a);
  word-break: break-word;
  line-height: 1.35;
}

span.field-value {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  white-space: pre-line;
}

.details-full-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #f1f5f9);
  min-width: 0;
}

.field-sub-note {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  margin-top: 3px;
  line-height: 1.35;
}

.status-pill-available {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  margin-top: 2px;
}

.status-pill-restricted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  margin-top: 2px;
}

/* Button Loading State */
.btn-loading {
  opacity: 0.82 !important;
  cursor: wait !important;
  pointer-events: none !important;
}

.btn-loading .svg-icon.spinner {
  animation: svg-spin 0.75s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

.btn-loading-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details-bottom-actions {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  background: var(--surface, #ffffff);
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 920;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06);
}

@media (min-width: 901px) {
  .details-bottom-actions {
    bottom: 0;
    left: var(--sidebar-width, 260px);
  }
}

.details-view-pdf-btn {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 9px;
  background: var(--surface, #ffffff);
  border: 1.5px solid #1877f2;
  color: #1877f2;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
  transition: all 0.15s ease;
}

.details-view-pdf-btn:hover:not(:disabled) {
  background: #f0f7ff;
  border-color: #1264cb;
  color: #1264cb;
}

.details-view-pdf-btn:disabled {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.65;
}

.details-view-pdf-btn .svg-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.details-pdf-btn {
  flex: 1.2;
  min-width: 0;
  height: 44px;
  border-radius: 9px;
  background: #1877f2;
  color: #ffffff;
  border: 1.5px solid #1877f2;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.25);
  transition: background 0.15s ease;
}

.details-pdf-btn:hover:not(:disabled) {
  background: #1264cb;
  border-color: #1264cb;
}

.details-pdf-btn:disabled {
  background: #94a3b8;
  border-color: #94a3b8;
  color: #f1f5f9;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.65;
}

.details-pdf-btn .svg-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.details-save-btn {
  height: 44px;
  width: 80px;
  border-radius: 9px;
  background: var(--surface, #ffffff);
  border: 1.5px solid #1877f2;
  color: #1877f2;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.details-save-btn:hover {
  background: #f0f7ff;
  border-color: #1264cb;
  color: #1264cb;
}

.details-save-btn.active {
  background: #e7f5ff;
  border-color: #1877f2;
  color: #1877f2;
}

.details-save-btn .svg-icon {
  width: 16px;
  height: 16px;
}

/* Dark Theme for Details View */
body.dark .details-top-bar {
  background: #0d1f33 url('../assets/bihar-skyline.png') right 4px bottom no-repeat;
  background-size: auto 64px;
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .details-back-btn {
  color: #60a5fa;
}

body.dark .details-back-btn:hover {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.12);
}

body.dark .details-header-copy h1 {
  color: #f0f4f8;
}

body.dark .details-header-copy p {
  color: #9fb3c8;
}

body.dark .verified-record-badge {
  background: #092e1e;
  border-color: #135d3d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark .verified-text strong {
  color: #34d399;
}

body.dark .verified-text small {
  color: #a7f3d0;
}

body.dark .details-section-card {
  background: #102a43;
  border-color: #243b53;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .details-card-head h3 {
  color: #f0f4f8;
}

body.dark .field-icon-badge {
  background: rgba(24, 119, 242, 0.25);
  color: #60a5fa;
}

body.dark .field-label {
  color: #9fb3c8;
}

body.dark .field-value {
  color: #f0f4f8;
}

body.dark span.field-value {
  color: #d9e2ec;
}

body.dark .details-full-field {
  border-top-color: #243b53;
}

body.dark .field-sub-note {
  color: #9fb3c8;
}

body.dark .status-pill-available {
  background: #092e1e;
  color: #34d399;
  border-color: #135d3d;
}

body.dark .status-pill-restricted {
  background: #2d2305;
  color: #fbbf24;
  border-color: #5c480b;
}

body.dark .details-view-pdf-btn {
  background: #102a43;
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark .details-view-pdf-btn:hover:not(:disabled) {
  background: #163659;
}

body.dark .details-view-pdf-btn:disabled {
  background: #0a192f;
  border-color: #243b53;
  color: #627d98;
}

body.dark .details-bottom-actions {
  background: #0a192f;
  border-top-color: #1e3a5f;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.4);
}

body.dark .details-save-btn {
  background: #102a43;
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark .details-save-btn:hover {
  background: #163659;
}

body.dark .details-save-btn.active {
  background: rgba(24, 119, 242, 0.25);
  border-color: #60a5fa;
  color: #60a5fa;
}
