/* ==========================================================================
   RBI Central Credit & Monitoring Registry — Institutional CSS Palette
   Theme: Pure Solid Institutional Color Tokens (Strictly NO Gradients)
   ========================================================================== */

/* 1. Theme Color Tokens (Pure Solid Colors) */
:root {
  /* Top Utility Bar */
  --utility-bg: #DCDCDC;
  --utility-text: #333333;
  --utility-border: #C0C0C0;

  /* Main Header (Branding) */
  --header-bg: #FFFFFF;
  --header-primary: #0B2265;
  --header-secondary: #111111;
  --header-border: #D1D5DB;

  /* Navigation Bar (Primary Accent) */
  --nav-bg: #E69538;
  --nav-text: #221200;
  --nav-divider: #D07B1E;
  --nav-active-bg: #2C82C9;
  --nav-active-text: #FFFFFF;

  /* Preamble / Accent Banner */
  --preamble-bg: #E1993C;
  --preamble-text: #1E1A16;

  /* Page Body / Workspace */
  --bg-workspace: #ECEEF1;

  /* Data Table Header */
  --table-head-bg: #D3DCE3;
  --table-head-text: #002B49;
  --table-head-border: #8FA2B0;

  /* Table Rows */
  --table-row-bg: #FFFFFF;
  --table-row-alt: #F8FAFC;
  --table-row-hover: #FFF9E6;
  --table-row-border: #E2E6EA;
  --table-row-text: #111111;

  /* Primary Footer */
  --footer-main-bg: #CED8DC;
  --footer-heading-primary: #0B4D8C;
  --footer-heading-secondary: #9C4A00;
  --footer-body-text: #222222;

  /* Bottom Sub-Footer */
  --footer-sub-bg: #4A4A4A;
  --footer-sub-text: #FFFFFF;
  --footer-sub-link: #E0E0E0;

  /* Action Buttons & Cards */
  --accent-mustard: #E69538;
  --btn-primary-bg: #0B2265;
  --btn-primary-text: #FFFFFF;
  --btn-secondary-bg: #FFFFFF;
  --btn-secondary-text: #111111;
  --btn-secondary-border: #8FA2B0;
  --card-bg: #FFFFFF;
  --card-border: #C0C0C0;

  /* Pure Solid Status Colors */
  --status-disbursed-bg: #E8F5E9;
  --status-disbursed-text: #1B5E20;
  --status-disbursed-border: #A5D6A7;

  --status-sanctioned-bg: #E3F2FD;
  --status-sanctioned-text: #0D47A1;
  --status-sanctioned-border: #90CAF9;

  --status-review-bg: #FFF3E0;
  --status-review-text: #E65100;
  --status-review-border: #FFCC80;

  --status-rejected-bg: #FFEBEE;
  --status-rejected-text: #C62828;
  --status-rejected-border: #EF9A9A;
}

/* Global Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-workspace);
  color: var(--table-row-text);
  line-height: 1.5;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Tabular Numerals Utility */
.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", "SF Mono", Consolas, Monaco, monospace;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 2. Top Utility Bar */
.rbi-statutory-bar {
  background-color: var(--utility-bg);
  color: var(--utility-text);
  padding: 6px 32px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--utility-border);
}

.statutory-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.statutory-badge {
  background-color: #B91C1C;
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.statutory-notice {
  color: var(--utility-text);
}

.statutory-time {
  color: #555555;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
}

/* 3. Main Header (Branding) */
.rbi-header {
  background-color: var(--header-bg);
  color: var(--header-secondary);
  padding: 16px 32px;
  border-bottom: 1px solid var(--header-border);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rbi-emblem-wrapper {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.rbi-emblem {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-hindi {
  font-size: 15px;
  font-weight: 700;
  color: var(--header-secondary);
  line-height: 1.2;
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
}

.brand-rbi {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--header-primary);
  line-height: 1;
}

.brand-sub {
  font-size: 15px;
  font-weight: 700;
  color: var(--header-primary);
  letter-spacing: 0.3px;
}

.brand-dept {
  font-size: 11px;
  color: #555555;
  font-weight: 500;
  margin-top: 2px;
}

/* Officer Profile Button & Menu */
.officer-profile-container {
  position: relative;
}

.officer-logo-btn {
  background-color: #F3F4F6;
  border: 1px solid var(--utility-border);
  border-radius: 24px;
  padding: 4px 12px 4px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  outline: none;
}

.officer-logo-btn:hover,
.officer-logo-btn:focus-visible {
  background-color: #E5E7EB;
  border-color: var(--header-primary);
}

.officer-avatar-logo {
  position: relative;
  width: 36px;
  height: 36px;
  background-color: var(--header-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.status-dot-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #22C55E;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

.dropdown-arrow {
  color: var(--utility-text);
  font-size: 10px;
  transition: transform 0.2s ease;
}

.officer-logo-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.officer-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  background-color: #FFFFFF;
  border: 2px solid var(--header-primary);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 150;
  padding: 16px;
  color: var(--header-secondary);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

.dropdown-avatar-large {
  width: 44px;
  height: 44px;
  background-color: var(--header-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.dropdown-name-group {
  display: flex;
  flex-direction: column;
}

.dropdown-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--header-primary);
}

.dropdown-role {
  font-size: 11px;
  color: #555555;
}

.dropdown-divider {
  height: 1px;
  background-color: #E5E7EB;
  margin: 8px 0 12px 0;
}

.dropdown-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.dropdown-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label {
  color: #666666;
  font-weight: 500;
}

.info-val {
  font-weight: 700;
  color: var(--header-secondary);
  font-family: monospace;
}

.info-val.badge {
  background-color: #E2E8F0;
  color: var(--header-primary);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--status-disbursed-bg);
  border: 1px solid var(--status-disbursed-border);
  padding: 1px 6px;
  border-radius: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--status-disbursed-text);
  border-radius: 50%;
}

.status-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--status-disbursed-text);
}

/* 4. Navigation Bar (Primary Accent) */
.rbi-navbar {
  background-color: var(--nav-bg);
  border-bottom: 2px solid var(--nav-divider);
  padding: 0 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rbi-navbar::-webkit-scrollbar {
  display: none;
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-item {
  border-right: 1px solid var(--nav-divider);
}

.nav-item:first-child {
  border-left: 1px solid var(--nav-divider);
}

.nav-link {
  display: block;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--nav-text);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: #D07B1E;
  color: #FFFFFF;
}

.nav-link.active {
  background-color: var(--nav-active-bg);
  color: var(--nav-active-text);
}

/* 5. Preamble / Accent Banner */
.rbi-preamble-banner {
  background-color: var(--preamble-bg);
  color: var(--preamble-text);
  padding: 10px 32px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #D07B1E;
  line-height: 1.4;
}

.preamble-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preamble-tag {
  background-color: #221200;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* 6. Page Body / Workspace Layout */
.app-layout {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 32px 40px 32px;
}

/* KPI Cards Grid */
.kpi-section {
  margin-bottom: 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.kpi-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.kpi-card:hover {
  border-color: var(--header-primary);
  box-shadow: 0 3px 8px rgba(11, 34, 101, 0.12);
}

.kpi-card:focus-visible {
  outline: 2px solid var(--header-primary);
  outline-offset: 2px;
}

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

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #555555;
  letter-spacing: 0.5px;
}

.kpi-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.kpi-tag.blue { background-color: #E2E8F0; color: #1E293B; }
.kpi-tag.cobalt { background-color: var(--status-sanctioned-bg); color: var(--status-sanctioned-text); }
.kpi-tag.green { background-color: var(--status-disbursed-bg); color: var(--status-disbursed-text); }
.kpi-tag.amber { background-color: var(--status-review-bg); color: var(--status-review-text); }

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--header-primary);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
  line-height: 1.2;
}

.kpi-footer {
  font-size: 12px;
  color: #666666;
  font-weight: 500;
}

/* 7. Controls Bar & Filters */
.controls-section {
  margin-bottom: 20px;
}

.controls-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.controls-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #666666;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 36px;
  font-size: 13px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background-color: #FFFFFF;
  color: var(--table-row-text);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--header-primary);
  box-shadow: 0 0 0 2px rgba(11, 34, 101, 0.12);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  color: #666666;
  cursor: pointer;
  padding: 0 4px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-select {
  padding: 9px 32px 9px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background-color: #FFFFFF;
  color: var(--table-row-text);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%3C333333' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.form-select:focus {
  border-color: var(--header-primary);
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--header-primary);
}

.btn-primary:hover {
  background-color: #07153B;
}

.btn-secondary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
  background-color: var(--table-row-hover);
  border-color: var(--header-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--footer-heading-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-text:hover {
  color: var(--header-primary);
}

.controls-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--table-row-border);
  font-size: 12px;
  color: #555555;
}

.summary-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  background-color: var(--table-head-bg);
  color: var(--table-head-text);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.table-bottom-summary {
  padding: 12px 16px;
  background-color: var(--table-row-alt);
  border-top: 1px solid var(--table-row-border);
  text-align: center;
}

/* Status Banners */
.status-banner {
  padding: 12px 18px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.status-banner.loading {
  background-color: var(--status-sanctioned-bg);
  border: 1px solid var(--status-sanctioned-border);
  color: var(--status-sanctioned-text);
}

.status-banner.error {
  background-color: var(--status-rejected-bg);
  border: 1px solid var(--status-rejected-border);
  color: var(--status-rejected-text);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--status-sanctioned-border);
  border-top-color: var(--status-sanctioned-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 8. Data Table Header & Rows Styling */
.table-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.table-scroll-container {
  overflow-x: auto;
  max-height: 650px;
  overflow-y: auto;
}

.rbi-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

/* Data Table Header */
.rbi-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--table-head-bg);
}

.rbi-table th {
  color: var(--table-head-text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 12px;
  border-bottom: 2px solid var(--table-head-border);
  white-space: nowrap;
  user-select: none;
}

.rbi-table th.sortable {
  cursor: pointer;
}

.rbi-table th.sortable:hover {
  background-color: #C3D0DC;
}

.sort-icon {
  display: inline-block;
  font-size: 10px;
  opacity: 0.7;
  margin-left: 4px;
}

.rbi-table th.active-sort .sort-icon {
  opacity: 1;
  color: var(--header-primary);
}

/* Table Rows */
.rbi-table td {
  padding: 12px;
  border-bottom: 1px solid var(--table-row-border);
  color: var(--table-row-text);
  background-color: var(--table-row-bg);
  vertical-align: middle;
}

/* Alternating Rows */
.rbi-table tbody tr:nth-child(even) td {
  background-color: var(--table-row-alt);
}

/* Hover Rows */
.rbi-table tbody tr:hover td {
  background-color: var(--table-row-hover);
  cursor: pointer;
}

/* Column Formatting */
.col-sl { width: 60px; text-align: center; color: #666666; font-size: 12px; }
.col-urn { width: 140px; }
.col-date { width: 110px; color: #444444; white-space: nowrap; }
.col-borrower { font-weight: 700; color: var(--table-head-text); min-width: 180px; }
.col-pan { width: 120px; }
.col-bank { min-width: 160px; font-weight: 600; }
.col-facility { min-width: 150px; color: #444444; }
.col-amount { font-weight: 800; font-family: "JetBrains Mono", Consolas, monospace; font-variant-numeric: tabular-nums; width: 140px; }
.col-tenure { width: 90px; font-family: monospace; }
.col-roi { width: 80px; font-family: monospace; font-weight: 700; }
.col-status { width: 130px; text-align: center; }

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Badges */
.urn-badge {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  background-color: #E2E8F0;
  border: 1px solid var(--card-border);
  color: var(--table-head-text);
  padding: 3px 7px;
  border-radius: 3px;
  display: inline-block;
}

.pan-badge {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  color: #333333;
  letter-spacing: 0.5px;
}

.bank-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bank-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--header-primary);
  flex-shrink: 0;
}

/* Pure Solid Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-badge.disbursed {
  background-color: var(--status-disbursed-bg);
  color: var(--status-disbursed-text);
  border-color: var(--status-disbursed-border);
}

.status-badge.sanctioned {
  background-color: var(--status-sanctioned-bg);
  color: var(--status-sanctioned-text);
  border-color: var(--status-sanctioned-border);
}

.status-badge.under-review {
  background-color: var(--status-review-bg);
  color: var(--status-review-text);
  border-color: var(--status-review-border);
}

.status-badge.rejected {
  background-color: var(--status-rejected-bg);
  color: var(--status-rejected-text);
  border-color: var(--status-rejected-border);
}

/* Empty State */
.empty-state-card {
  padding: 48px 24px;
  text-align: center;
  color: #666666;
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--table-head-border);
}

.empty-state-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--table-head-text);
  margin-bottom: 6px;
}

.empty-state-card p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* Modal Dossier */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 17, 17, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background-color: #FFFFFF;
  border: 2px solid var(--header-primary);
  border-radius: 4px;
  width: 820px;
  max-width: 100%;
  max-height: 90vh;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  background-color: var(--header-primary);
  color: #FFFFFF;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-rbi-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  background-color: var(--accent-mustard);
  color: #221200;
  padding: 2px 6px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 4px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}

.modal-close {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 13px;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dossier-item {
  background-color: var(--bg-workspace);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 10px 14px;
}

.dossier-item-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #555555;
  margin-bottom: 4px;
}

.dossier-item-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--table-head-text);
}

.dossier-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--header-primary);
  border-bottom: 2px solid var(--card-border);
  padding-bottom: 6px;
  margin: 18px 0 12px 0;
}

.dossier-stamp-box {
  border: 2px dashed var(--header-primary);
  background-color: #F8FAFC;
  border-radius: 4px;
  padding: 12px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stamp-badge {
  color: var(--header-primary);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
}

.modal-footer {
  background-color: #F8FAFC;
  border-top: 1px solid var(--card-border);
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 9. Primary Footer */
.rbi-footer-primary {
  background-color: var(--footer-main-bg);
  padding: 32px;
  border-top: 2px solid var(--utility-border);
  color: var(--footer-body-text);
  font-size: 13px;
}

.footer-primary-container {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--footer-heading-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col h4.accent-heading {
  color: var(--footer-heading-secondary);
}

.footer-col p {
  color: var(--footer-body-text);
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 12px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-list a {
  color: var(--footer-body-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.footer-links-list a:hover {
  color: var(--footer-heading-primary);
  text-decoration: underline;
}

/* 10. Bottom Sub-Footer */
.rbi-footer-sub {
  background-color: var(--footer-sub-bg);
  color: var(--footer-sub-text);
  padding: 16px 32px;
  font-size: 12px;
  border-top: 1px solid #333333;
}

.footer-sub-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-sub-links {
  display: flex;
  gap: 16px;
}

.footer-sub-links a {
  color: var(--footer-sub-link);
  text-decoration: none;
}

.footer-sub-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-sub-meta {
  color: var(--footer-sub-link);
  font-family: monospace;
  font-size: 11px;
}

/* ==========================================================================
   Responsive Mobile & Tablet Design
   ========================================================================== */

@media (max-width: 1024px) {
  .app-layout {
    padding: 20px 20px 32px 20px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .controls-row-main {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-box-wrapper {
    width: 100%;
    min-width: 0;
  }

  .filter-group {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .select-wrapper {
    flex: 1;
    min-width: 180px;
  }

  .form-select {
    width: 100%;
  }

  .action-btn-group {
    width: 100%;
    justify-content: flex-end;
  }

  .footer-primary-container {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  /* 1. Ultra-compact Top Statutory Bar */
  .rbi-statutory-bar {
    padding: 4px 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 28px;
  }

  .statutory-content {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }

  .statutory-badge {
    padding: 1px 5px;
    font-size: 9px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .statutory-notice {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }

  .statutory-time {
    font-size: 9.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 2. Perfectly Aligned Header & Officer Profile Button */
  .rbi-header {
    padding: 10px 12px;
  }

  .header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
  }

  .header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .rbi-emblem-wrapper {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .rbi-emblem {
    width: 38px;
    height: 38px;
  }

  .brand-text {
    min-width: 0;
    overflow: hidden;
  }

  .brand-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-rbi {
    font-size: 18px;
    line-height: 1;
  }

  .brand-sub {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-dept {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .officer-profile-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .officer-logo-btn {
    padding: 3px 8px 3px 4px;
    gap: 6px;
  }

  .officer-avatar-logo {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .dropdown-arrow {
    font-size: 9px;
  }

  .rbi-navbar {
    padding: 0 16px;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 12px;
  }

  .rbi-preamble-banner {
    padding: 10px 16px;
  }

  .preamble-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
  }

  .app-layout {
    padding: 16px 12px 28px 12px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 14px 16px;
  }

  .kpi-value {
    font-size: 22px;
  }

  .controls-card {
    padding: 12px 14px;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .select-wrapper {
    width: 100%;
    min-width: 0;
  }

  .action-btn-group {
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: 94vh;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .dossier-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dossier-stamp-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-primary-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rbi-footer-primary {
    padding: 24px 16px;
  }

  .rbi-footer-sub {
    padding: 16px;
  }

  .footer-sub-container {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
  }

  .footer-sub-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }
  
  .officer-dropdown-menu {
    width: 280px;
    right: -10px;
  }
}

/* Print Styles */
@media print {
  body {
    background-color: #FFFFFF;
    min-width: 100%;
  }
  .rbi-statutory-bar, .rbi-navbar, .rbi-preamble-banner, .controls-section, .rbi-footer-primary, .rbi-footer-sub {
    display: none !important;
  }
  .table-scroll-container {
    max-height: none !important;
    overflow: visible !important;
  }
  .rbi-table th {
    background-color: var(--table-head-bg) !important;
    color: var(--table-head-text) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
