:root {
  /* ── Brand Palette ────────────────────────────── */
  --primary: #D94A27;           /* Fire Orange */
  --primary-hover: #bf3d1e;
  --primary-light: #fdf1ee;
  --primary-border: #f4b3a0;
  --navy: #123B4A;              /* Deep Teal-Navy */
  --navy-light: #1a4f62;        /* Slightly lighter teal */
  --navy-surface: #205e74;      /* Surface teal */
  --navy-dark: #0d2d39;         /* Darker teal for depth */
  /* ── Neutral Palette ──────────────────────────── */
  --slate-50: #F5F7F8;          /* Brand light background */
  --slate-100: #edf0f2;
  --slate-200: #dde3e7;
  --slate-300: #c3cdd4;
  --slate-400: #8fa3ae;
  --slate-500: #607d8b;
  --slate-600: #4a6170;
  --slate-700: #334a57;
  --slate-800: #1a3340;
  --slate-900: #0d2230;
  /* ── Semantic Colors ──────────────────────────── */
  --success: #16a34a;
  --success-light: #f0fdf4;
  --success-border: #86efac;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fcd34d;
  --danger: #D94A27;
  --danger-light: #fdf1ee;
  --danger-border: #f4b3a0;
  --info: #D94A27;              /* Accent uses brand orange */
  --info-light: #fdf1ee;
  --info-border: #f4b3a0;
  /* ── Layout ───────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.06);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 400;
  background-color: #F5F7F8;
  color: var(--slate-900);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Typography Hierarchy (Specification Matrix)
   ========================================================================== */

/* 1. Main page title (Inter, 700 Bold, 20–24px) */
.clerk-title-row h1,
.brand-title {
  font-family: var(--font-display);
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* 2. Section headings (Inter, 650–700, 16–18px) */
.desk-section-heading,
h1, h2, h3,
.modal-title {
  font-family: var(--font-display);
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* 3. Card titles (Inter, 600 Semi-Bold, 14–15px) */
.metric-card-title,
.activity-feed-title {
  font-family: var(--font-sans);
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* 4. Large numbers (Inter, 700 Bold, 22–28px) */
.metric-card-val {
  font-family: var(--font-display);
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* 5. Table headings (Inter, 600 Semi-Bold, 11–12px) */
.desk-table th {
  font-family: var(--font-sans);
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 6. Table content (Inter, 500 Medium, 13–14px) */
.desk-table td {
  font-family: var(--font-sans);
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.4;
}

.app-building-title {
  font-family: var(--font-sans);
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a;
}

/* 7. Body text (Inter, 400 Regular, 13–14px) */
p, .modal-body, .sla-priority-sub {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
}

/* 8. Labels / metadata (Inter, 500 Medium, 11–12px) */
.meta-pill,
.meta-pill-text,
.meta-pill-val,
.stage-owner-sub,
.activity-item-time,
.pagination-info,
.metric-trend-label,
.metric-card-link span,
.metric-footer-text,
.metric-footer-more {
  font-family: var(--font-sans);
  font-size: 11.5px !important;
  font-weight: 500 !important;
}

/* 9. Buttons (Inter, 600 Semi-Bold, 12–13px) */
.btn,
.btn-capsule-doc,
.btn-capsule-primary,
.btn-capsule-urgent,
.btn-capsule-rejection,
.btn-capsule-outline-blue,
.btn-capsule-outline-indigo,
.pagination-btn,
.pagination-page-num,
.theme-toggle-btn,
.pill-segmented-btn {
  font-family: var(--font-sans);
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

/* 10. Sidebar navigation (Inter, 500–600, 13–14px) */
.sidebar-nav-item,
.sidebar-nav-link,
.sidebar-user-title {
  font-family: var(--font-sans);
  font-size: 13.5px !important;
  font-weight: 600 !important;
}

.sidebar-council-tag {
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* 11. Status / badges (Inter, 600, 11–12px) */
.stage-badge,
.sla-pill-urgent,
.normal-submission-badge,
.app-id-pill,
.occupancy-tag-pill,
.activity-live-badge,
.queue-num-badge,
.badge {
  font-family: var(--font-sans);
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Full Width Header
   ========================================================================== */
.app-header {
  background-color: var(--navy);
  color: white;
  width: 100%;
  border-bottom: 3px solid #D94A27;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.header-inner {
  width: 100%;
  padding: 0.45rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.role-selector-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(18, 59, 74, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
}

.role-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.role-select {
  background: #1a4f62;
  color: #ffffff;
  border: 1.5px solid #D94A27;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.825rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.role-select:hover,
.role-select:focus {
  border-color: #f07a5e;
  box-shadow: 0 0 0 2px rgba(217, 74, 39, 0.3);
}

.brand-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.25rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #D94A27, #bf3d1e);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(217, 74, 39, 0.4);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.775rem;
  color: var(--slate-400);
  font-weight: 400;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.app-meta-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--slate-200);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.app-meta-badge .dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
}

.screen-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--slate-300);
}

.screen-select {
  background: var(--navy-light);
  color: white;
  border: 1px solid var(--navy-surface);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}

/* ==========================================================================
   Full Width Stepper Navigation Bar
   ========================================================================== */
.stepper-nav-container {
  background: white;
  border-bottom: 1px solid var(--slate-200);
  width: 100%;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.stepper-inner {
  width: 100%;
  padding: 0.3rem 1.25rem;
}

.stepper-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 0;
  min-width: max-content;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  color: var(--slate-600);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  flex-shrink: 0;
  font-weight: 500;
}

.step-item:hover {
  background: var(--slate-100);
  color: var(--navy);
}

.step-item.active {
  background: #fdf1ee;
  color: #bf3d1e;
  border-color: #f4b3a0;
  font-weight: 700;
}

.step-item.completed {
  color: var(--success);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--slate-200);
  color: var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.step-item.active .step-num {
  background: #D94A27;
  color: white;
}

.step-item.completed .step-num {
  background: var(--success);
  color: white;
}

.step-divider {
  color: var(--slate-300);
  font-size: 0.75rem;
  flex-shrink: 0;
  user-select: none;
}

/* Separates visually distinct sections in the stepper (e.g. Clerk intake vs Inspector Reports) */
.step-section-sep {
  color: var(--slate-300);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
  padding: 0 0.35rem;
  opacity: 0.55;
  letter-spacing: 0.05em;
}


.stepper-stage-separator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: #F5F7F8;
  border: 1px dashed #cbd5e1;
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
  color: #475569;
  margin: 0 0.6rem;
  flex-shrink: 0;
  user-select: none;
}

.stepper-stage-separator.inspector-report {
  background: #fdf1ee;
  border-color: #f4b3a0;
  color: #bf3d1e;
}

.stepper-stage-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-right: 0.25rem;
  user-select: none;
}

/* ==========================================================================
   Full Page Main Container (100% Fluid Width with Left Sidebar)
   ========================================================================== */
.main-wrapper {
  flex: 1;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 46px);
  background-color: #F5F7F8;
}

/* Left Navigation Sidebar (Full-Height Seamless Dark Column) */
.clerk-nav-sidebar {
  width: 230px;
  background: #123B4A;
  border-radius: 0;
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  border-left: none;
  border-top: none;
  border-bottom: none;
  min-height: calc(100vh - 46px);
  height: 100%;
  position: sticky;
  top: 46px;
  align-self: stretch;
  user-select: none;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

/* User & Municipal Identity Strip */
.sidebar-user-header {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sidebar-avatar-ring {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
}

.online-indicator-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #123B4A;
  box-shadow: 0 0 6px #22c55e;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-title {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.8rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.sidebar-council-tag {
  font-size: 0.6rem;
  color: #94a3b8;
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Section Titles */
.sidebar-section-title {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  padding: 0.25rem 0.35rem 0.2rem;
}

.sidebar-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-item {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.44rem 0.6rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  text-align: left;
  position: relative;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-icon-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.nav-icon-box svg {
  display: block;
}

.sidebar-nav-item:hover .nav-icon-box {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav-item.active .nav-icon-box {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.nav-icon-box.icon-sla {
  color: #fb923c;
}

.nav-icon-box.icon-disallowed {
  color: #f87171;
}

.view-container {
  flex: 1;
  width: calc(100% - 230px);
  max-width: calc(100% - 230px);
  margin: 0;
  padding: 0.55rem 0.85rem;
  overflow-y: auto;
}

/* Renewal Status Badges */
.renewal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font-size: 0.725rem;
  font-weight: 700;
  white-space: nowrap;
}

.renewal-badge.renewal-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.renewal-badge.renewal-due-soon {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.renewal-badge.renewal-overdue {
  background: #fdf1ee;
  color: #bf3d1e;
  border: 1px solid #fecaca;
}

body.dark-mode .renewal-badge.renewal-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

body.dark-mode .renewal-badge.renewal-due-soon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

body.dark-mode .renewal-badge.renewal-overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}


/* Full Width Screen Card (Clean, Spacious, Enterprise Grade) */
.screen-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 4px 20px -2px rgba(18, 59, 74, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.screen-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--slate-200);
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.screen-title-group h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.screen-title-group .screen-tag {
  font-size: 0.7rem;
  background: #D94A27;
  color: white;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.screen-subtitle {
  font-size: 0.825rem;
  color: var(--slate-600);
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.screen-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  flex: 1;
}

.screen-footer {
  padding: 1rem 1.5rem;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Document Scrutiny Page Grid (Spacious & Cleanly Aligned)
   ========================================================================== */
.scrutiny-page-grid {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 1.5rem;
  flex: 1;
  align-items: start;
  width: 100%;
}

@media (max-width: 1200px) {
  .scrutiny-page-grid {
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 992px) {
  .scrutiny-page-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.scrutiny-left-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.scrutiny-right-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.card-box-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 0.85rem;
  gap: 0.75rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: #64748b;
  font-weight: 600;
  font-size: 0.825rem;
  flex-shrink: 0;
}

.detail-val {
  color: #123B4A;
  font-weight: 700;
  text-align: right;
  font-size: 0.85rem;
}

/* 2-Column Document Grid with Interactive Cards */
.doc-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
  width: 100%;
}

@media (max-width: 768px) {
  .doc-grid-2col {
    grid-template-columns: 1fr;
  }
}

.doc-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.doc-card-item:hover {
  border-color: #D94A27;
  background: #fdf1ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 74, 39, 0.1);
}

.doc-card-item:active {
  transform: translateY(0);
}

.doc-card-icon {
  width: 36px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  background: #F5F7F8;
  border: 1px solid #e2e8f0;
}

.doc-card-icon.photo {
  background: #fee2e2;
  border-color: #fecaca;
}

.doc-card-meta {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.doc-card-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.825rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card-sub {
  font-size: 0.725rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.doc-open-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #D94A27;
  color: #D94A27;
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.doc-card-item:hover .doc-open-btn {
  background: #D94A27;
  color: white;
}

.doc-open-btn.photo-btn {
  border-color: #D94A27;
  color: #D94A27;
}

.doc-card-item:hover .doc-open-btn.photo-btn {
  background: #D94A27;
  color: white;
}

.doc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.doc-pill:hover {
  border-color: #D94A27;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 74, 39, 0.08);
}


/* ==========================================================================
   Full Width Metrics KPI Grid
   ========================================================================== */
.stats-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  width: 100%;
}

@media (max-width: 1400px) {
  .stats-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .stats-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .stats-grid-5 {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  background: white;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.highlight-reinspection {
  border-color: #fcd34d;
  background: #fffdf5;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.blue {
  background: #e0f2fe;
  color: #D94A27;
}

.stat-icon.amber {
  background: #fef3c7;
  color: #d97706;
}

.stat-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.stat-icon.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.stat-icon.red {
  background: #fee2e2;
  color: #D94A27;
}

.stat-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  font-family: var(--font-sans);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--slate-600);
  margin-top: 3px;
  font-weight: 600;
}

/* ==========================================================================
   Full Width Tabs for Queue Switching
   ========================================================================== */
.queue-tabs {
  display: flex;
  gap: 0.75rem;
  border-bottom: 2px solid var(--slate-200);
  width: 100%;
}

.queue-tab-btn {
  background: transparent;
  border: none;
  padding: 0.85rem 1.5rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: inherit;
}

.queue-tab-btn:hover {
  color: var(--navy);
  background: var(--slate-50);
}

.queue-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.tab-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: var(--slate-200);
  color: var(--slate-700);
  font-weight: 700;
}

.queue-tab-btn.active .tab-badge {
  background: var(--primary);
  color: white;
}

/* ==========================================================================
   Filter Bar & Filter Pills
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.filter-pill {
  border: 1px solid var(--slate-300);
  background: white;
  color: var(--slate-700);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
}

.filter-pill:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
  color: var(--navy);
}

.filter-pill.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  box-shadow: 0 1px 3px rgba(18, 59, 74, 0.2);
  font-weight: 700;
}

/* ==========================================================================
   Full Width Clean Tables
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: white;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table-custom th {
  background: var(--slate-50);
  padding: 1rem 1.25rem;
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--slate-200);
}

.table-custom td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.875rem;
  color: var(--slate-800);
  vertical-align: middle;
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tr:hover td {
  background-color: #fafbfc;
}

.app-id-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.queue-num-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  background: #e0f2fe;
  color: #bf3d1e;
  border-radius: 4px;
}

/* ==========================================================================
   Badges & Tags
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 700;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid var(--info-border);
}

.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

/* ==========================================================================
   Buttons & Actions
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(217, 74, 39, 0.25);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #15803d;
}

.btn-outline {
  background: white;
  border-color: var(--slate-300);
  color: var(--slate-700);
}

.btn-outline:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
}

/* ==========================================================================
   Alerts & Banners
   ========================================================================== */
.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.alert-info {
  background: #fdf1ee;
  border: 1px solid #f4b3a0;
  color: #bf3d1e;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.alert-danger {
  background: #fdf1ee;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ==========================================================================
   Form Elements & Detail Cards
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 900px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card-box {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  background: white;
}

.card-box-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--slate-200);
  font-size: 0.775rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--slate-500);
  font-weight: 500;
}

.detail-val {
  color: var(--navy);
  font-weight: 600;
  text-align: right;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--navy);
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 74, 39, 0.1);
}

/* ==========================================================================
   NBC Checklist Grid & Gauge
   ========================================================================== */
.checklist-item-card {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: white;
  transition: all 0.2s;
}

.checklist-item-card.is-pass {
  border-left: 5px solid var(--success);
}

.checklist-item-card.is-fail {
  border-left: 5px solid var(--danger);
  background: #fffdfd;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.checklist-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--navy);
}

.checklist-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--slate-100);
  border-radius: 4px;
  color: var(--slate-600);
}

.btn-toggle-group {
  display: flex;
  gap: 0.5rem;
}

.btn-toggle {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--slate-300);
  background: white;
  color: var(--slate-600);
}

.btn-toggle.active-pass {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-toggle.active-fail {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* Branch Decision Cards */
.branch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.branch-card {
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 2px solid var(--slate-200);
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.branch-card.branch-deficiencies {
  border-color: #f4b3a0;
  background: #fff8f8;
}

.branch-card.branch-pass {
  border-color: #86efac;
  background: #f6fef9;
}

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 59, 74, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.modal-backdrop.show {
  display: flex;
}

.modal-card {
  background: white;
  border-radius: var(--radius-md);
  width: 540px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-card.doc-viewer-card {
  width: 820px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.doc-preview-body {
  padding: 1.5rem;
  overflow-y: auto;
  background: #f8fafc;
  max-height: 65vh;
}

.paper-doc-frame {
  background: white;
  border: 1px solid var(--slate-300);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  background: var(--navy);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.canvas-wrapper {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  background: #fafafa;
  cursor: crosshair;
}

.dsc-hardware-box {
  background: var(--slate-100);
  padding: 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dsc-key-icon {
  font-size: 1.75rem;
}

/* ==========================================================================
   Official Certificate Layout (Screen 16)
   ========================================================================== */
.official-certificate-frame {
  border: 10px double #991b1b;
  padding: 2.5rem;
  background: #fffdfa;
  position: relative;
  box-shadow: var(--shadow-md);
  margin: 0 auto;
  width: 100%;
}

.cert-header {
  text-align: center;
  border-bottom: 2px solid #991b1b;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.cert-header h1 {
  font-size: 1.6rem;
  color: #991b1b;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cert-header h3 {
  font-size: 1rem;
  color: var(--navy);
  font-weight: 600;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.cert-qr-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid #991b1b;
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.qr-placeholder {
  width: 110px;
  height: 110px;
  background: white;
  border: 2px solid var(--slate-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-align: center;
  padding: 4px;
}

/* Doc Pill and Re-Inspection Stage Styles */
.doc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.825rem;
}

.doc-pill:hover {
  border-color: var(--info);
  background: #fdf1ee;
}

.re-stage-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 0.5rem;
}

.re-stage-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: white;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.re-stage-tab.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* Helper Text Classes */
.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-slate {
  color: var(--slate-500);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.fw-bold {
  font-weight: 700;
}

/* ==========================================================================
   Advanced Statutory Enhancements Styles
   ========================================================================== */

/* Quantitative Test Gauge Cards */
.gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.gauge-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.4rem;
}

.gauge-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gauge-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gauge-input-wrapper input {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--slate-300);
  background: white;
  width: 100px;
}

/* Interactive Digital Signature Blocks */
.signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.signature-box {
  background: #ffffff;
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius-sm);
  padding: 1rem;
  position: relative;
  transition: all 0.2s;
}

.signature-box.signed {
  border-color: #22c55e;
  background: #f0fdf4;
}

.sig-header {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.sig-line {
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 1.75rem;
  color: var(--navy);
  line-height: 1.2;
  margin: 0.5rem 0;
  user-select: none;
}

.sig-meta {
  font-size: 0.725rem;
  color: var(--slate-500);
  line-height: 1.4;
}

/* Before vs After Comparison Matrix */
.comparison-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
  margin-top: 0.5rem;
}

.comparison-matrix th,
.comparison-matrix td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--slate-200);
  text-align: left;
}

.comparison-matrix th {
  background: var(--navy);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Cryptographic DSC Certificate Token Seal */
.dsc-token-badge {
  background: linear-gradient(135deg, #123B4A, #1a4f62);
  border: 1.5px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.dsc-icon {
  font-size: 2rem;
}

.dsc-details {
  font-size: 0.775rem;
  line-height: 1.5;
}

/* Audit Trail Timeline */
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  padding-left: 1.5rem;
}

.audit-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--slate-200);
}

.timeline-event {
  position: relative;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.85rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid white;
}

.timeline-event.clerk::before {
  background: #D94A27;
}

.timeline-event.inspector::before {
  background: #f59e0b;
}

.timeline-event.cfo::before {
  background: #D94A27;
}

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

/* Integrity & Security Seal */
.integrity-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.775rem;
  font-weight: 700;
  color: #15803d;
}

/* ==========================================================================
   Dashboard KPI Grid & Executive Counters
   ========================================================================== */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.kpi-val {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: var(--font-sans);
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 4px;
}

.kpi-sub {
  font-size: 0.725rem;
  color: var(--slate-500);
  margin-top: 2px;
}

/* Intake Dual Tab Switcher */
.intake-tab-bar {
  display: flex;
  gap: 0.75rem;
  border-bottom: 2px solid var(--slate-200);
  margin-bottom: 1rem;
  width: 100%;
}

.intake-tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.intake-tab-btn:hover {
  color: var(--navy);
  background: var(--slate-50);
  border-radius: 6px 6px 0 0;
}

.intake-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
  background: transparent;
}

/* Queue Filter Pills */
.queue-filter-pills {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.queue-filter-btn {
  background: white;
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
}

.queue-filter-btn:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
  color: var(--navy);
}

.queue-filter-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  box-shadow: 0 1px 3px rgba(18, 59, 74, 0.2);
  font-weight: 700;
}

/* Table Enhancements */
.queue-num-badge {
  display: inline-block;
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.new-pill {
  display: inline-block;
  background: #10b981;
  color: white;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-id-pill {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.85rem;
}

.applicant-cell-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.85rem;
}

.applicant-contact-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.725rem;
  color: var(--slate-600);
  margin-top: 4px;
}

.sla-deadline-box {
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  font-size: 0.75rem;
  display: inline-block;
}

.sla-deadline-box.is-urgent {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.sla-remaining {
  font-weight: 700;
}

.today-highlight-row {
  background: #f0fdf4 !important;
}

.today-highlight-row:hover td {
  background: #e2fbe8 !important;
}

/* ==========================================================================
   Fire Inspector Property Roster & Geolocation Visualizer
   ========================================================================== */
.inspector-layout-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .inspector-layout-grid {
    grid-template-columns: 1fr;
  }
}

.property-list-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 720px;
  overflow-y: auto;
  padding-right: 4px;
}

.property-roster-card {
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.property-roster-card:hover {
  border-color: #D94A27;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.property-roster-card.active {
  border-color: #D94A27;
  background: #fdf1ee;
  box-shadow: 0 4px 14px rgba(217, 74, 39, 0.15);
}

.property-roster-card.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #D94A27;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.property-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.property-title {
  font-weight: 800;
  color: var(--navy);
  font-size: 0.925rem;
}

.property-subtext {
  font-size: 0.775rem;
  color: var(--slate-600);
}

.property-meta-pills {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.property-meta-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--slate-100);
  color: var(--slate-700);
}

/* Building Image Box */
.building-photo-frame {
  position: relative;
  width: 100%;
  height: 230px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  background: #123B4A;
}

.building-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.building-photo-frame:hover img {
  transform: scale(1.03);
}

.building-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(18, 59, 74, 0.9) 0%, rgba(18, 59, 74, 0.4) 70%, transparent 100%);
  padding: 1rem 1.25rem 0.75rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.building-photo-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.building-photo-badge {
  background: rgba(34, 197, 94, 0.9);
  color: white;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

/* Map Visualizer */
.map-visualizer-container {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
  position: relative;
}

.map-mock-canvas {
  width: 100%;
  height: 150px;
  border-radius: 6px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
  border: 1px solid #cbd5e1;
}

.map-route-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}



.assignment-corner-card {
  border: 1px solid var(--slate-200) !important;
  border-top: 3px solid #D94A27 !important;
  background: white !important;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nearest-station-banner {
  background: #fdf1ee;
  border: 1px solid #f4b3a0;
  color: #bf3d1e;
  border-radius: 4px;
  padding: 0.4rem 0.65rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.station-intel-title {
  font-size: 0.775rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #0d2d39;
}

.station-intel-badge {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.675rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.verdict-action-box {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.scrutiny-btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-pass-action {
  background: #059669 !important;
  color: white !important;
  font-weight: 700 !important;
  padding: 0.65rem 1.15rem !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-pass-action:hover {
  background: #047857 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

.btn-reject-action {
  background: #fdf1ee !important;
  color: #bf3d1e !important;
  border: 1px solid #f87171 !important;
  font-weight: 700 !important;
  padding: 0.65rem 1rem !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-reject-action:hover {
  background: #D94A27 !important;
  color: white !important;
  border-color: #D94A27 !important;
}

.btn-query-action {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fcd34d !important;
  font-weight: 700 !important;
  padding: 0.65rem 1rem !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-query-action:hover {
  background: #d97706 !important;
  color: white !important;
  border-color: #d97706 !important;
}

/* ==========================================================================
   Application Overview & Dispatch Modal Styles
   ========================================================================== */
.overview-section-title {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.overview-banner {
  background: linear-gradient(135deg, #123B4A 0%, #1a4f62 100%);
  color: white;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Statutory Paper Document Preview Simulation Styles
   ========================================================================== */
.statutory-paper-document {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  box-sizing: border-box;
  text-align: left;
}

.gov-doc-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.gov-emblem-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: #123B4A;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gov-dept-sub {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.gov-doc-divider {
  height: 2px;
  background: linear-gradient(90deg, #D94A27, #123B4A);
  margin: 0.5rem 0 0.75rem 0;
  border-radius: 2px;
}

.gov-doc-badge {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.gov-doc-badge.agency-badge {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
}

.gov-doc-badge.tech-badge {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.gov-doc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 2px;
}

.gov-doc-subtitle {
  font-size: 0.68rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.gov-meta-table {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  color: #334155;
}

.gov-section-heading {
  font-size: 0.72rem;
  font-weight: 800;
  color: #123B4A;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.65rem 0 0.35rem 0;
}

.gov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  margin-bottom: 0.65rem;
}

.gov-table th {
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  padding: 4px 6px;
  text-align: left;
}

.gov-table td {
  border: 1px solid #e2e8f0;
  padding: 4px 6px;
  vertical-align: top;
  color: #334155;
}

.gov-text {
  font-size: 0.72rem;
  color: #334155;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.gov-list {
  font-size: 0.7rem;
  color: #334155;
  margin: 0.25rem 0 0.5rem 1.1rem;
  padding: 0;
  line-height: 1.4;
}

.gov-footer-sign {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #cbd5e1;
}

.seal-circle {
  width: 76px;
  height: 76px;
  border: 2px dashed #b91c1c;
  border-radius: 50%;
  color: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1.15;
  transform: rotate(-8deg);
  opacity: 0.85;
}

.seal-circle.blue-seal {
  border-color: #1d4ed8;
  color: #1d4ed8;
  transform: rotate(5deg);
}

.seal-circle.red-seal {
  border-color: #b91c1c;
  color: #b91c1c;
  transform: rotate(-12deg);
}

.sign-block {
  text-align: right;
  font-size: 0.68rem;
}

.sign-name {
  font-weight: 800;
  color: #0f172a;
}

.sign-role {
  color: #475569;
  font-weight: 600;
}

.sign-dept {
  color: #94a3b8;
  font-size: 0.6rem;
}

.stamp-paper-header {
  background: #fdf2f8;
  border: 2px solid #db2777;
  border-radius: 4px;
  padding: 0.4rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.stamp-rect {
  color: #9d174d;
}

.stamp-gov {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.stamp-value {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.1;
  color: #be185d;
}

.stamp-state {
  font-size: 0.58rem;
  font-weight: 700;
}

.photo-geotag-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.68rem;
  line-height: 1.35;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  text-align: left;
}

.overview-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #D94A27;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.overview-panel {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.overview-panel-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--slate-200);
}

.overview-panel-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.overview-panel-label {
  color: var(--slate-500);
  font-weight: 500;
}

.overview-panel-value {
  color: var(--slate-900);
  font-weight: 600;
  text-align: right;
}

.overview-doc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 0.775rem;
}

.overview-memo-callout {
  background: #f8fafc;
  border-left: 3px solid #D94A27;
  border-top: 1px solid var(--slate-200);
  border-right: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
  line-height: 1.5;
  color: var(--slate-700);
  margin-bottom: 0.85rem;
}

.overview-notify-strip {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.775rem;
  color: #166534;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ==========================================================================
   Modern Clerk Workspace & Desk (Compact Zero-Scroll Theme)
   ========================================================================== */
.clerk-home-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.clerk-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding-bottom: 0.15rem;
  border-bottom: 1.5px solid #e2e8f0;
  margin-bottom: 0;
  flex-shrink: 0;
}

.clerk-top-left {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.clerk-tag-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: white;
  background: #D94A27;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  text-transform: uppercase;
  width: fit-content;
}

.clerk-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.clerk-title-row h1 {
  font-size: 0.925rem;
  font-weight: 800;
  color: #123B4A;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.15;
}

.clerk-council-sub {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 500;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0.12rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: #205e74;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.theme-toggle-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Top KPI Statistic Cards (Interactive Compact Cards) */
.clerk-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 0;
  flex-shrink: 0;
}

.clerk-stats-row.stats-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.clerk-stats-row.stats-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.clerk-stats-row.stats-row-5 {
  grid-template-columns: repeat(5, 1fr);
}

.clerk-stat-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  min-height: 42px;
}

.clerk-stat-card:hover {
  transform: translateY(-1px);
  border-color: #D94A27;
  box-shadow: 0 2px 8px rgba(217, 74, 39, 0.12);
}

.clerk-stat-card.stat-today {
  border-left: 3.5px solid #16a34a;
}

.clerk-stat-card.stat-all {
  border-left: 3.5px solid #D94A27;
}

.clerk-stat-card.stat-needs-attention {
  border-left: 3.5px solid #f59e0b;
}

.clerk-stat-card.stat-approaching-sla {
  border-left: 3.5px solid #D94A27;
}

.clerk-stat-card.stat-reinspections {
  border-left: 3.5px solid #ea580c;
}

.clerk-stat-card.stat-reports-review {
  border-left: 3.5px solid #6366f1;
}

.clerk-stat-card.stat-awaiting-inspection {
  border-left: 3.5px solid #D94A27;
}

.clerk-stat-card.stat-returned {
  border-left: 3.5px solid #f43f5e;
}

.clerk-stat-card.stat-rejected {
  border-left: 3.5px solid #D94A27;
}

.clerk-stat-card.active-stat {
  border-color: #D94A27;
  background: linear-gradient(180deg, #fdf1ee 0%, #ffffff 100%);
  box-shadow: 0 2px 8px rgba(217, 74, 39, 0.15);
}

.clerk-stat-card.stat-rejected.active-stat {
  border-color: #D94A27;
  background: linear-gradient(180deg, #fdf1ee 0%, #ffffff 100%);
}

.clerk-stat-card.active-stat .clerk-stat-num {
  color: #D94A27;
}

.clerk-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.clerk-stat-num {
  font-size: 1rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1;
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
}

.clerk-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #1a4f62;
  line-height: 1.1;
  margin-top: 1px;
}

.clerk-stat-sub {
  display: none;
}

.clerk-stat-icon-wrap {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.clerk-stat-action-hint {
  display: none;
}

/* 2-Column Dashboard Layout */
.clerk-main-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 1rem;
  align-items: start;
  width: 100%;
}

@media (max-width: 1200px) {
  .clerk-main-layout {
    grid-template-columns: 1fr;
  }
}

/* Application Desk Panel */
.clerk-desk-panel {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.desk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.95rem 0.2rem 0.95rem;
}

.desk-header-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #123B4A;
  letter-spacing: -0.01em;
}

.desk-header-badge {
  font-size: 0.675rem;
  font-weight: 600;
  color: #D94A27;
  background: #fdf1ee;
  border: 1px solid #f4b3a0;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}



/* Tab Bar (Legacy support) */
.desk-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.95rem;
  border-bottom: 1.5px solid #e2e8f0;
  margin-top: 0.1rem;
  overflow-x: auto;
}

.desk-tab {
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
}

.desk-tab:hover {
  color: #D94A27;
  background: #f8fafc;
}

.desk-tab.active {
  color: #D94A27;
  border-bottom-color: #D94A27;
  font-weight: 700;
  background: #fdf1ee;
}

.desk-tab .tab-badge-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  transition: all 0.15s ease;
}

.desk-tab.active .tab-badge-pill {
  background: #D94A27;
  color: white;
}

.desk-search-btn {
  background: #D94A27;
  border: 1px solid #D94A27;
  border-radius: 9999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.desk-search-btn:hover {
  background: #bf3d1e;
  border-color: #bf3d1e;
}

/* Table Container (Clean No Scroll with Pagination) */
.desk-table-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
}

.desk-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.desk-table thead th {
  background: #F5F7F8;
  color: #475569;
  font-size: 0.685rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.desk-table tbody td {
  padding: 0.38rem 0.85rem;
  border-bottom: 1px solid #F5F7F8;
  vertical-align: middle;
}

.desk-table tbody tr {
  transition: background-color 0.15s ease;
}

.desk-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Pagination Bar (Matching Brand Palette) */
.desk-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: #F5F7F8;
  border-top: 1px solid #e2e8f0;
  font-size: 0.725rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-info {
  font-size: 0.725rem;
  color: #475569;
}

.pagination-info strong {
  color: #123B4A;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #123B4A;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pagination-btn:hover:not(:disabled) {
  background: #123B4A;
  border-color: #123B4A;
  color: #ffffff;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.pagination-page-num {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #123B4A;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 26px;
  height: 26px;
  padding: 0 0.35rem;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  font-family: inherit;
}

.pagination-page-num:hover:not(.active) {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.pagination-page-num.active {
  background: #123B4A;
  border-color: #123B4A;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(18, 59, 74, 0.25);
}

.app-building-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #123B4A;
  line-height: 1.25;
}

.app-ref-id {
  font-size: 0.7rem;
  color: #D94A27;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-top: 1px;
}

.app-type-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 1px;
}

/* Current Stage Badges */
.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  line-height: 1.2;
}

.stage-badge.under-scrutiny {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.stage-badge.report-submitted {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.stage-badge.visit-scheduled {
  background: #e0f2fe;
  color: #bf3d1e;
  border: 1px solid #f4b3a0;
}

.stage-badge.returned-correction {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.stage-badge.reinspection-active {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.stage-badge.reinspection-pending {
  background: #F5F7F8;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.stage-owner-sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
}

.next-action-text {
  font-size: 0.775rem;
  color: #1a4f62;
  font-weight: 600;
}

/* Desk Action Buttons (Pill Shaped • Brand Palette: #123B4A Navy for Scrutinize, #D94A27 Fire Orange for Expedite) */
.desk-action-btn {
  background: #123B4A;
  color: #ffffff;
  border: 1px solid #0d2d39;
  border-radius: 9999px;
  padding: 0.32rem 0.95rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(18, 59, 74, 0.15);
}

.desk-action-btn:hover {
  background: #1a4f62;
  border-color: #123B4A;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(18, 59, 74, 0.25);
  transform: translateY(-1px);
}

.desk-action-btn.btn-outline-blue {
  background: #F5F7F8;
  color: #123B4A;
  border: 1.5px solid #123B4A;
  border-radius: 9999px;
}

.desk-action-btn.btn-outline-blue:hover {
  background: #123B4A;
  border-color: #123B4A;
  color: #ffffff;
}

.desk-action-btn.btn-outline-indigo {
  background: #1a4f62;
  color: #ffffff;
  border: 1px solid #123B4A;
  border-radius: 9999px;
}

.desk-action-btn.btn-outline-indigo:hover {
  background: #123B4A;
  color: #ffffff;
  border-color: #0d2d39;
}

.desk-action-btn.btn-outline-rose {
  background: #F5F7F8;
  color: #D94A27;
  border: 1.5px solid #D94A27;
  border-radius: 9999px;
}

.desk-action-btn.btn-outline-rose:hover {
  background: #D94A27;
  color: #ffffff;
  border-color: #D94A27;
}

/* Expedite & Assign: Fire Orange #D94A27 */
.desk-action-btn.btn-urgent-sla {
  background: #D94A27 !important;
  color: #ffffff !important;
  border: 1px solid #bf3d1e !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 6px rgba(217, 74, 39, 0.28) !important;
}

.desk-action-btn.btn-urgent-sla:hover {
  background: #bf3d1e !important;
  border-color: #991b1b !important;
  box-shadow: 0 4px 10px rgba(217, 74, 39, 0.38) !important;
  transform: translateY(-1px);
}

.desk-action-btn.btn-view-doc-quick {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.32rem 0.8rem;
  font-size: 0.73rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.desk-action-btn.btn-view-doc-quick:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.16);
  transform: translateY(-1.5px);
}

.desk-action-btn.btn-view-doc-quick:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Unified Action Capsule Group */
.desk-action-capsule {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 2px 3px;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  white-space: nowrap;
}

.desk-action-capsule .btn-capsule-doc {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.28rem 0.68rem;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.desk-action-capsule .btn-capsule-doc:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  box-shadow: 0 2px 4px rgba(3, 105, 161, 0.12);
}

.desk-action-capsule .btn-capsule-primary {
  background: #123B4A;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  font-size: 0.73rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(18, 59, 74, 0.2);
}

.desk-action-capsule .btn-capsule-primary:hover {
  background: #1a4f62;
  box-shadow: 0 2px 6px rgba(18, 59, 74, 0.3);
}

.desk-action-capsule .btn-capsule-urgent {
  background: #D94A27;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  font-size: 0.73rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(217, 74, 39, 0.25);
}

.desk-action-capsule .btn-capsule-urgent:hover {
  background: #bf3d1e;
  box-shadow: 0 2px 6px rgba(217, 74, 39, 0.35);
}

.desk-action-capsule .btn-capsule-outline-blue {
  background: #ffffff;
  color: #123B4A;
  border: 1px solid #94a3b8;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.28rem 0.78rem;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.desk-action-capsule .btn-capsule-outline-blue:hover {
  background: #123B4A;
  color: #ffffff;
  border-color: #123B4A;
}

.desk-action-capsule .btn-capsule-outline-indigo {
  background: #1a4f62;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.3rem 0.82rem;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.desk-action-capsule .btn-capsule-outline-indigo:hover {
  background: #123B4A;
}

.desk-action-capsule .btn-capsule-rejection {
  background: #fef2f2;
  color: #D94A27;
  border: 1px solid #fca5a5;
  border-radius: 9999px;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.desk-action-capsule .btn-capsule-rejection:hover {
  background: #D94A27;
  color: #ffffff;
}

.desk-actions-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.sla-priority-banner {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sla-priority-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sla-priority-sub {
  font-size: 0.72rem;
  color: #b45309;
  margin-top: 2px;
}

.sla-pill-urgent {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fdf1ee;
  border: 1px solid #fecaca;
  color: #bf3d1e;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.stat-approaching-sla.active-stat {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.stat-approaching-sla.active-stat .clerk-stat-num {
  color: #d97706;
}

/* Certificates Register Stat Card Variants */
.clerk-stat-card.stat-cert-total {
  border-left: 4.5px solid #D94A27;
}

.clerk-stat-card.stat-cert-total.active-stat {
  border-color: #D94A27;
  background: linear-gradient(180deg, #fdf1ee 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(217, 74, 39, 0.2);
}

.clerk-stat-card.stat-cert-due {
  border-left: 4.5px solid #f59e0b;
}

.clerk-stat-card.stat-cert-due.active-stat {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.clerk-stat-card.stat-cert-active {
  border-left: 4.5px solid #22c55e;
}

.clerk-stat-card.stat-cert-active.active-stat {
  border-color: #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2);
}

.clerk-stat-card.stat-cert-overdue {
  border-left: 4.5px solid #D94A27;
}

.clerk-stat-card.stat-cert-overdue.active-stat {
  border-color: #D94A27;
  background: linear-gradient(180deg, #fdf1ee 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

/* Renewal Status Pill Badges */
.renewal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  line-height: 1.2;
  white-space: nowrap;
}

.renewal-badge.renewal-active {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #86efac;
}

.renewal-badge.renewal-due-soon {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.renewal-badge.renewal-overdue {
  background: #fdf1ee;
  color: #D94A27;
  border: 1px solid #fecaca;
}

/* Clean Portal-Themed Tabbed Sections for Certificates */
.cert-tab-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cert-tab-nav-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cert-nav-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.55rem 0.35rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cert-nav-tab:hover {
  color: #123B4A;
}

.cert-nav-tab.active {
  color: #D94A27;
  font-weight: 700;
  border-bottom-color: #D94A27;
}

.tab-count-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #475569;
  line-height: 1;
  transition: all 0.15s ease;
}

.cert-nav-tab:hover .tab-count-circle {
  background: #cbd5e1;
  color: #1e293b;
}

.cert-nav-tab.active .tab-count-circle {
  background: #D94A27;
  color: #ffffff;
}

.cert-nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cert-nav-search-wrap svg {
  position: absolute;
  left: 10px;
  pointer-events: none;
}

.cert-nav-search-wrap .pill-search-input {
  padding-left: 28px;
  width: 230px;
}

body.dark-mode .cert-tab-nav-bar {
  border-bottom-color: #205e74;
}

body.dark-mode .cert-nav-tab {
  color: #94a3b8;
}

body.dark-mode .cert-nav-tab:hover {
  color: #e2e8f0;
}

body.dark-mode .cert-nav-tab.active {
  color: #fb923c;
  border-bottom-color: #fb923c;
}

body.dark-mode .tab-count-circle {
  background: #205e74;
  color: #cbd5e1;
}

body.dark-mode .cert-nav-tab.active .tab-count-circle {
  background: #fb923c;
  color: #ffffff;
}

/* Right Sidebar Cards (Compact) */
.clerk-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.process-guide-card {
  background: #0f2942;
  color: white;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
}

.process-guide-tag {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.process-guide-title {
  font-size: 0.925rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.process-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.process-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.process-step-num {
  font-weight: 700;
  color: #94a3b8;
  font-size: 0.75rem;
  min-width: 12px;
}

/* Legacy activity-feed removed in favor of modern component rules */

/* Dark Theme Support for Clerk Workspace */
body.dark-mode {
  background-color: #0b1120;
  color: #F5F7F8;
}

body.dark-mode .screen-card,
body.dark-mode .clerk-stat-card,
body.dark-mode .clerk-desk-panel,
body.dark-mode .activity-feed-card {
  background: #1a4f62;
  border-color: #205e74;
}

body.dark-mode .clerk-title-row h1,
body.dark-mode .clerk-stat-num,
body.dark-mode .desk-header-title,
body.dark-mode .app-building-title,
body.dark-mode .activity-item-title {
  color: #f8fafc;
}

body.dark-mode .desk-tabs {
  border-bottom-color: #205e74;
}

body.dark-mode .desk-tab {
  color: #94a3b8;
}

body.dark-mode .desk-tab.active {
  color: #f8fafc;
  border-bottom-color: #f97316;
}

body.dark-mode .desk-search-bar {
  background: #1a4f62;
  border-bottom-color: #205e74;
}

body.dark-mode .desk-search-label {
  color: #cbd5e1;
}

body.dark-mode .desk-search-input {
  background: #123B4A;
  border-color: #205e74;
  color: #f8fafc;
}

body.dark-mode .desk-search-btn,
body.dark-mode .desk-open-btn,
body.dark-mode .theme-toggle-btn {
  background: #123B4A;
  border-color: #475569;
  color: #f8fafc;
}

body.dark-mode .desk-table thead th {
  background: #123B4A;
  color: #94a3b8;
  border-bottom-color: #205e74;
}

body.dark-mode .desk-table tbody td {
  border-bottom-color: #205e74;
}

body.dark-mode .desk-table tbody tr:hover {
  background-color: #123B4A;
}

body.dark-mode .card-box {
  background: #1a4f62;
  border-color: #205e74;
}

body.dark-mode .card-box-header {
  color: #f8fafc;
  border-bottom-color: #205e74;
}

body.dark-mode .detail-row {
  border-bottom-color: #205e74;
}

body.dark-mode .detail-label {
  color: #94a3b8;
}

body.dark-mode .detail-val {
  color: #f8fafc;
}

body.dark-mode .doc-card-item {
  background: #1a4f62;
  border-color: #205e74;
}

body.dark-mode .doc-card-item:hover {
  background: #123B4A;
  border-color: #D94A27;
}

body.dark-mode .doc-card-name {
  color: #f8fafc;
}

body.dark-mode .doc-card-sub {
  color: #94a3b8;
}

body.dark-mode .doc-card-icon {
  background: #123B4A;
  border-color: #205e74;
}

body.dark-mode .doc-open-btn {
  background: #123B4A;
  border-color: #D94A27;
  color: #D94A27;
}

body.dark-mode .doc-card-item:hover .doc-open-btn {
  background: #D94A27;
  color: #123B4A;
}

/* Today's Intake & SLA Badges & Action Buttons */
.today-intake-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 4px;
}

.normal-submission-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #bf3d1e;
  background: #fdf1ee;
  border: 1px solid #f4b3a0;
  padding: 2px 8px;
  border-radius: 4px;
}

.sla-pill-urgent {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #D94A27;
  background: #fdf1ee;
  border: 1px solid #fecaca;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(217, 74, 39, 0.1);
}

.btn-urgent-sla {
  background: #D94A27 !important;
  color: #ffffff !important;
  border: 1px solid #bf3d1e !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(217, 74, 39, 0.3) !important;
}

.btn-urgent-sla:hover {
  background: #bf3d1e !important;
  border-color: #991b1b !important;
  box-shadow: 0 4px 10px rgba(217, 74, 39, 0.4) !important;
}

.sla-priority-banner {
  background: linear-gradient(135deg, #fdf1ee 0%, #fee2e2 100%);
  border: 1.5px solid #f87171;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sla-priority-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #991b1b;
}

.sla-priority-sub {
  font-size: 0.75rem;
  color: #7f1d1d;
  margin-top: 2px;
}

/* ==========================================================================
   Document Grid & Compact Item Styles (Exact 1:1 Match to Reference Image)
   ========================================================================== */
.doc-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 0.6rem 0.85rem;
  margin-bottom: 0.65rem;
  flex: 1;
}

.doc-card-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.doc-card-item:hover {
  border-color: #D94A27;
  background: #fdf1ee;
  box-shadow: 0 2px 10px rgba(217, 74, 39, 0.12);
  transform: translateY(-1px);
}

.doc-card-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.doc-card-icon-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.doc-card-icon-box.pdf {
  background: #F5F7F8;
  color: #64748b;
}

.doc-card-icon-box.jpg {
  background: #fee2e2;
  color: #D94A27;
}

.doc-card-text {
  min-width: 0;
  flex: 1;
}

.doc-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a4f62;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  margin-bottom: 2px;
}

.doc-card-meta {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.doc-open-btn {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
  text-decoration: none;
  background: #ffffff;
}

.doc-open-btn.btn-open-pdf {
  border: 1.5px solid #D94A27;
  color: #D94A27;
}

.doc-open-btn.btn-open-pdf:hover {
  background: #D94A27;
  color: #ffffff;
}

.doc-open-btn.btn-view-jpg {
  border: 1.5px solid #f87171;
  color: #D94A27;
}

.doc-open-btn.btn-view-jpg:hover {
  background: #D94A27;
  color: #ffffff;
}

/* Document Scrutiny States */
.doc-card-item.doc-status-rejected {
  border-color: #f4b3a0 !important;
  background: #fff8f8 !important;
}

.statutory-cleared-banner {
  margin-top: auto;
}

.doc-card-item.doc-status-rejected:hover {
  border-color: #D94A27 !important;
  box-shadow: 0 2px 10px rgba(217, 74, 39, 0.12) !important;
}

.doc-card-item.doc-status-passed {
  border-color: #86efac;
}

/* Floating Toast Notification */
.fas-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #123B4A;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fas-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.fas-toast.toast-success {
  background: #15803d;
  border: 1px solid #4ade80;
}

.fas-toast.toast-danger {
  background: #bf3d1e;
  border: 1px solid #f87171;
}

.fas-toast.toast-warning {
  background: #c2410c;
  border: 1px solid #fb923c;
}

/* ==========================================================================
   Grouped Sidebar & Badge Styles
   ========================================================================== */
.nav-label-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.sidebar-badge-count {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  min-width: 18px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.sidebar-nav-item.active .sidebar-badge-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-badge-count.badge-warning {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
  border-color: rgba(234, 88, 12, 0.4);
}

.sidebar-badge-count.badge-alert {
  background: rgba(217, 74, 39, 0.25);
  color: #fca5a5;
  border-color: rgba(217, 74, 39, 0.45);
}

.sidebar-nav-item.active .sidebar-badge-count.badge-warning,
.sidebar-nav-item.active .sidebar-badge-count.badge-alert {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Sidebar Compliance Card */
.sidebar-compliance-card {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-compliance-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.compliance-card-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.compliance-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px #22c55e;
}

.compliance-title {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

.compliance-rate-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.compliance-rate-num {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.compliance-rate-tag {
  font-size: 0.55rem;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}

.compliance-subtext {
  font-size: 0.58rem;
  color: #94a3b8;
  margin: 0.08rem 0 0.35rem;
}

.compliance-action-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.compliance-action-btn:hover {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  border-color: #ea580c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

/* ==========================================================================
   Top Overview Split Grid (2x2 Reference Metric Cards + Right Chart) - Compact
   ========================================================================== */
.clerk-overview-top-section {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 0.45rem;
  align-items: stretch;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .clerk-overview-top-section {
    grid-template-columns: 1fr;
  }
}

.clerk-stats-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  height: 100%;
}

.clerk-metric-card {
  background: #ffffff;
  border: 1.5px solid #e8edf0;
  border-radius: 8px;
  padding: 0.45rem 0.65rem 0.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.metric-card-watermark-icon {
  position: absolute;
  right: 8px;
  bottom: -4px;
  font-size: 2.35rem;
  line-height: 1;
  opacity: 0.15;
  pointer-events: none;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.clerk-metric-card:hover .metric-card-watermark-icon {
  opacity: 0.32;
  transform: scale(1.12) rotate(3deg);
}

.clerk-metric-card.active-metric .metric-card-watermark-icon {
  opacity: 0.26;
}

.clerk-metric-card:hover {
  transform: translateY(-1px);
  border-color: #D94A27;
  box-shadow: 0 3px 8px rgba(217, 74, 39, 0.1);
}

.clerk-metric-card.active-metric {
  border-color: #123B4A;
  box-shadow: 0 0 0 1.5px #123B4A, 0 3px 10px rgba(18, 59, 74, 0.12);
  background: #ffffff;
}

.metric-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.metric-card-title {
  font-size: 0.775rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.15;
}

.metric-card-sub {
  font-size: 0.625rem;
  color: #8fa3ae;
  font-weight: 500;
  margin-top: 1px;
}

.metric-card-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F5F7F8;
  border: 1px solid #dde3e7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #4a6170;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.clerk-metric-card:hover .metric-card-icon-btn {
  background: #fdf1ee;
  border-color: #f4b3a0;
  color: #D94A27;
}

.metric-card-body {
  margin: 0.15rem 0 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.metric-value-num {
  font-size: 1.15rem;
  font-weight: 900;
  color: #123B4A;
  line-height: 1;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

.metric-value-unit {
  font-size: 0.685rem;
  font-weight: 700;
  color: #64748b;
}

.metric-trend-pill-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.metric-trend-pill {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.05rem 0.35rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.metric-trend-pill.pill-blue {
  background: #e0f2fe;
  color: #0369a1;
}

.metric-trend-pill.pill-orange {
  background: #fdf1ee;
  color: #D94A27;
}

.metric-trend-pill.pill-yellow {
  background: #fef3c7;
  color: #b45309;
}

.metric-trend-pill.pill-green {
  background: #dcfce7;
  color: #15803d;
}

.metric-trend-label {
  font-size: 0.62rem;
  color: #8fa3ae;
  font-weight: 500;
}

.metric-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.2rem;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.685rem;
  color: #334a57;
  font-weight: 700;
}

.metric-footer-more {
  color: #8fa3ae;
  font-weight: 500;
  font-size: 0.62rem;
  margin-left: 2px;
}

.metric-footer-chevron {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1;
  font-weight: 400;
}

/* ==========================================================================
   Inspection Analytics Dual-Tone Chart Card (Compact)
   ========================================================================== */
.clerk-analytics-card {
  background: #ffffff;
  border: 1.5px solid #e8edf0;
  border-radius: 8px;
  padding: 0.45rem 0.65rem 0.35rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.analytics-top-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.analytics-main-title {
  font-size: 0.775rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.15;
}

.analytics-sub-title {
  font-size: 0.625rem;
  color: #8fa3ae;
  font-weight: 500;
  margin-top: 1px;
}

.analytics-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.analytics-type-dropdown {
  background: #ffffff;
  border: 1px solid #dde3e7;
  border-radius: 9999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #334a57;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  appearance: auto;
}

.analytics-type-dropdown:hover, .analytics-type-dropdown:focus {
  border-color: #123B4A;
}

.analytics-action-icon-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F5F7F8;
  border: 1px solid #dde3e7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a6170;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.analytics-action-icon-btn:hover {
  background: #e2e8f0;
  color: #123B4A;
}

.analytics-sub-metric-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.08rem 0 0.15rem;
}

.analytics-period-text {
  font-size: 0.625rem;
  font-weight: 600;
  color: #64748b;
}

.analytics-growth-badge {
  font-size: 0.58rem;
  font-weight: 800;
  background: #dcfce7;
  color: #15803d;
  padding: 0.05rem 0.35rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Main Chart Layout with Y-Axis and Plot Area */
.analytics-chart-layout {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 65px;
  position: relative;
  gap: 0.25rem;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 15px; /* space for X-axis labels */
  font-size: 0.54rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: right;
  user-select: none;
  min-width: 16px;
  line-height: 1;
}

.chart-plot-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-horizontal-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}

.chart-gridline {
  width: 100%;
  border-bottom: 1px dashed #eef2f6;
  height: 0;
}

.chart-gridline.bottom {
  border-bottom: 1px solid #e2e8f0;
}

.chart-columns-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 100%;
  position: relative;
  z-index: 2;
  gap: 0.2rem;
}

.chart-column-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  flex: 1;
  position: relative;
  cursor: pointer;
  padding-bottom: 1px;
}

.chart-duo-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: calc(100% - 15px);
  justify-content: center;
}

.chart-bar {
  width: 10px;
  border-radius: 2px 2px 0 0;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s ease, filter 0.15s ease;
  position: relative;
}

.chart-bar.bar-emerald {
  background: #059669;
}

.chart-bar.bar-amber {
  background: #D94A27;
}

.chart-column-item:hover .chart-bar {
  filter: brightness(1.12);
  transform: scaleY(1.03);
}

.chart-col-tooltip {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f2935;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-align: center;
  line-height: 1.25;
}

.chart-column-item:hover .chart-col-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.chart-col-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  margin-top: 2px;
  height: 14px;
  line-height: 14px;
  white-space: nowrap;
}

.chart-column-item:hover .chart-col-label {
  color: #123B4A;
}

/* Bottom Legend */
.analytics-bottom-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding-top: 0.15rem;
  border-top: 1px solid #f1f5f9;
  margin-top: 0.1rem;
}

.analytics-legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: #475569;
}

.legend-line {
  width: 10px;
  height: 3px;
  border-radius: 2px;
}

.legend-line.emerald {
  background: #059669;
}

.legend-line.amber {
  background: #D94A27;
}

/* ==========================================================================
   Quick Filter Chips & Enhanced Desk Controls
   ========================================================================== */
.desk-quick-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  background: #fafbfc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.quick-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.desk-filter-chip {
  background: #ffffff;
  border: 1px solid #dde3e7;
  border-radius: 9999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.685rem;
  font-weight: 700;
  color: #4a6170;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.desk-filter-chip:hover {
  border-color: #123B4A;
  color: #123B4A;
}

.desk-filter-chip.active {
  background: #123B4A;
  border-color: #123B4A;
  color: #ffffff;
}

.btn-outline-blue {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  color: #0284c7;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.32rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-outline-blue:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline-indigo {
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  color: #4f46e5;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.32rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-outline-indigo:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  transform: translateY(-1px);
}

.occupancy-select-box {
  background: #ffffff;
  border: 1px solid #dde3e7;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.685rem;
  font-weight: 700;
  color: var(--navy);
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   Fast Priority Row Switch Toggle
   ========================================================================== */
.priority-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.priority-toggle {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 14px;
}

.priority-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 20px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

.priority-toggle input:checked + .slider-round {
  background-color: #D94A27;
}

.priority-toggle input:checked + .slider-round:before {
  transform: translateX(10px);
}

/* ==========================================================================
   Upcoming Field Visits Widget (Right Sidebar)
   ========================================================================== */
.upcoming-inspections-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.upcoming-inspections-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #f1f5f9;
}

.upcoming-inspections-title {
  font-size: 0.685rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.upcoming-inspections-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.upcoming-inspection-item {
  background: #F5F7F8;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.25rem 0.35rem;
  transition: all 0.15s ease;
}

.upcoming-inspection-item:hover {
  border-color: #D94A27;
  background: #ffffff;
}

.upcoming-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1px;
}

.upcoming-item-time {
  font-size: 0.58rem;
  font-weight: 800;
  color: #D94A27;
  background: #fdf1ee;
  padding: 0.05rem 0.25rem;
  border-radius: 2px;
}

.upcoming-item-officer {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--navy);
}

.upcoming-item-building {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-item-type {
  font-size: 0.6rem;
  color: #64748b;
}

.upcoming-item-action-btn {
  margin-top: 0.15rem;
  width: 100%;
  background: #ffffff;
  border: 1px solid #dde3e7;
  color: var(--navy);
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.upcoming-item-action-btn:hover {
  background: #123B4A;
  border-color: #123B4A;
  color: #ffffff;
}

/* ==========================================================================
   Pill-Shaped Header, Toolbar, Segmented Tabs & Action Buttons (Ultra-Compact)
   ========================================================================== */
.clerk-overview-top-section {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .clerk-overview-top-section {
    grid-template-columns: 1fr;
  }
}

.clerk-stats-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
}

.clerk-metric-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  padding: 0.28rem 0.55rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.14s ease;
  min-height: 46px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.clerk-metric-card:hover {
  transform: translateY(-1px);
  border-color: #D94A27;
  box-shadow: 0 2px 6px rgba(217, 74, 39, 0.12);
}

.clerk-metric-card.active-metric {
  border-color: #D94A27;
  background: linear-gradient(180deg, #fdf6f4 0%, #ffffff 100%);
  box-shadow: 0 0 0 1px #D94A27;
}

.metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.3rem;
}

.metric-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.1;
}

.metric-card-sub {
  font-size: 0.58rem;
  color: #64748b;
  line-height: 1;
  margin-top: 1px;
}

.metric-card-icon-btn {
  font-size: 0.75rem;
  opacity: 0.85;
}

.metric-card-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 1px 0;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.metric-value-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-value-unit {
  font-size: 0.6rem;
  color: #64748b;
  font-weight: 600;
}

.metric-trend-pill-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
}

.metric-trend-pill {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 9999px;
}

.metric-trend-pill.pill-blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.metric-trend-pill.pill-orange {
  background: #fff7ed;
  color: #c2410c;
}

.metric-trend-pill.pill-green {
  background: #f0fdf4;
  color: #15803d;
}

.metric-trend-label {
  font-size: 0.56rem;
  color: #94a3b8;
}

.metric-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.58rem;
  color: #64748b;
  padding-top: 2px;
  border-top: 1px solid #f8fafc;
}

.metric-footer-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.metric-footer-more {
  color: #D94A27;
  font-weight: 700;
}

.metric-footer-chevron {
  font-weight: 700;
  color: #94a3b8;
}

.desk-section-header-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.1rem 0.15rem 0.3rem;
  border-bottom: 1px solid #eef2f5;
  margin-bottom: 0.35rem;
}

.desk-section-heading {
  font-size: 0.95rem;
  font-weight: 800;
  color: #123B4A;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.desk-section-subheading {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 1px;
  line-height: 1.1;
}

.pill-btn-primary {
  background: #D94A27;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.26rem 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(217, 74, 39, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.16s ease;
  font-family: inherit;
  white-space: nowrap;
}

.pill-btn-primary:hover {
  background: #bf3d1e;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(217, 74, 39, 0.38);
}

.desk-pill-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.pill-segmented-control {
  background: #eef2f5;
  border-radius: 9999px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #e2e8f0;
}

.pill-segmented-btn {
  background: transparent;
  color: #64748b;
  border: none;
  border-radius: 9999px;
  padding: 0.24rem 0.72rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.pill-segmented-btn:hover {
  color: #123B4A;
}

.pill-segmented-btn.active {
  background: #123B4A;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(18, 59, 74, 0.22);
}

.pill-count-sub {
  font-size: 0.68rem;
  opacity: 0.85;
}

.pill-utility-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pill-utility-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.pill-utility-btn:hover {
  border-color: #123B4A;
  color: #123B4A;
  background: #f8fafc;
}

.pill-utility-select-wrap {
  display: inline-flex;
  align-items: center;
}

.pill-utility-select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.pill-utility-select:focus,
.pill-utility-select:hover {
  border-color: #123B4A;
  color: #123B4A;
}

.pill-search-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.18rem 0.6rem;
  transition: all 0.15s ease;
}

.pill-search-wrap:focus-within {
  border-color: #123B4A;
  box-shadow: 0 0 0 2px rgba(18, 59, 74, 0.12);
}

.pill-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.72rem;
  color: #1e293b;
  font-family: inherit;
  width: 95px;
}

.pill-search-input::placeholder {
  color: #94a3b8;
}

/* Pill styling for action buttons and badges across dashboard */
.desk-action-btn {
  border-radius: 9999px !important;
  padding: 0.24rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  font-family: inherit;
}

.stage-badge,
.app-id-pill,
.sla-pill-urgent,
.normal-submission-badge,
.pagination-page-num,
.pagination-btn,
.queue-num-badge {
  border-radius: 9999px !important;
}

/* ==========================================================================
   Dashboard Overview Top Section (2x2 KPI Cards + Analytics Box)
   ========================================================================== */
.clerk-home-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.clerk-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 0.3rem 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.2rem;
}

.clerk-top-left {
  display: flex;
  align-items: center;
}

.clerk-title-row {
  display: flex;
  align-items: center;
}

.clerk-title-row h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #123B4A;
  margin: 0;
  letter-spacing: -0.01em;
}

.clerk-council-sub {
  font-size: 0.75rem;
  color: #64748b;
}

.theme-toggle-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.16s ease;
}

.theme-toggle-btn:hover {
  border-color: #123B4A;
  background: #f8fafc;
}

/* 4-Column Overview Top Section (Compact 2 Rows of 4 Cards) */
.clerk-overview-top-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  align-items: stretch;
  width: 100%;
  margin-bottom: 0.45rem;
}

@media (max-width: 1100px) {
  .clerk-overview-top-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .clerk-overview-top-section {
    grid-template-columns: 1fr;
  }
}

/* Compact Metric Cards (Pastel Reference Design) */
.clerk-metric-card {
  position: relative;
  border-radius: 8px;
  padding: 0.45rem 0.75rem 0.4rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 64px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  border-width: 1.25px;
  border-style: solid;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* 8 Individual Pastel Card Themes (2 Rows of 4 Cards) */
.clerk-metric-card.card-theme-attention {
  background: #FFFDF5;
  border-color: #FDE68A;
}
.clerk-metric-card.card-theme-attention:hover,
.clerk-metric-card.card-theme-attention.active-metric {
  border-color: #F59E0B;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-total {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.clerk-metric-card.card-theme-total:hover,
.clerk-metric-card.card-theme-total.active-metric {
  border-color: #475569;
  box-shadow: 0 3px 10px rgba(71, 85, 105, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-today,
.clerk-metric-card.card-theme-verified {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.clerk-metric-card.card-theme-today:hover,
.clerk-metric-card.card-theme-today.active-metric,
.clerk-metric-card.card-theme-verified:hover,
.clerk-metric-card.card-theme-verified.active-metric {
  border-color: #16A34A;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-surveyor {
  background: #F0F9FF;
  border-color: #BAE6FD;
}
.clerk-metric-card.card-theme-surveyor:hover,
.clerk-metric-card.card-theme-surveyor.active-metric {
  border-color: #0284C7;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-inspected {
  background: #F0FDFA;
  border-color: #99F6E4;
}
.clerk-metric-card.card-theme-inspected:hover,
.clerk-metric-card.card-theme-inspected.active-metric {
  border-color: #0D9488;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-verification,
.clerk-metric-card.card-theme-reports {
  background: #FAF5FF;
  border-color: #E9D5FF;
}
.clerk-metric-card.card-theme-verification:hover,
.clerk-metric-card.card-theme-verification.active-metric,
.clerk-metric-card.card-theme-reports:hover,
.clerk-metric-card.card-theme-reports.active-metric {
  border-color: #9333EA;
  box-shadow: 0 3px 10px rgba(147, 51, 234, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-compliance {
  background: #FFF9F5;
  border-color: #FFEDD5;
}
.clerk-metric-card.card-theme-compliance:hover,
.clerk-metric-card.card-theme-compliance.active-metric {
  border-color: #F97316;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-reinspect {
  background: #F4FBF6;
  border-color: #BBF7D0;
}
.clerk-metric-card.card-theme-reinspect:hover,
.clerk-metric-card.card-theme-reinspect.active-metric {
  border-color: #22C55E;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.16);
  transform: translateY(-1.5px);
}

.clerk-metric-card.card-theme-rejected {
  background: #FFF5F5;
  border-color: #FECACA;
}
.clerk-metric-card.card-theme-rejected:hover,
.clerk-metric-card.card-theme-rejected.active-metric {
  border-color: #EF4444;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.16);
  transform: translateY(-1.5px);
}

.metric-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.metric-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 0.1rem;
}

.metric-card-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.05;
  margin-bottom: 0.15rem;
  font-family: inherit;
}

.metric-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
  transition: color 0.15s ease;
  line-height: 1;
}

.clerk-metric-card:hover .metric-card-link {
  color: #0f172a;
}

.metric-link-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.clerk-metric-card:hover .metric-link-arrow {
  transform: translateX(2px);
}

.metric-watermark-svg {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.clerk-metric-card:hover .metric-watermark-svg {
  transform: translateY(-50%) scale(1.08);
}

.metric-trend-label {
  font-size: 0.58rem;
  color: #64748b;
}

.metric-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  padding-top: 0.2rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.62rem;
  color: #475569;
  font-weight: 600;
}

.metric-footer-text {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-footer-more {
  color: #64748b;
  font-size: 0.58rem;
}

.metric-footer-chevron {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Compliance & Analytics Chart Box (Compact) */
.clerk-analytics-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.38rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.analytics-top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.analytics-main-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.15;
}

.analytics-sub-title {
  font-size: 0.62rem;
  color: #64748b;
  margin-top: 1px;
}

.analytics-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.analytics-type-dropdown {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #123B4A;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.analytics-action-icon-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
}

.analytics-sub-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  font-size: 0.62rem;
}

.analytics-period-text {
  color: #64748b;
  font-weight: 600;
}

.analytics-growth-badge {
  background: #dcfce7;
  color: #16a34a;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 9999px;
  font-size: 0.58rem;
}

.analytics-chart-layout {
  display: flex;
  gap: 0.35rem;
  height: 72px;
  margin-bottom: 0.15rem;
  position: relative;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.52rem;
  color: #94a3b8;
  padding-bottom: 14px;
  font-family: var(--font-mono);
}

.chart-plot-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-horizontal-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.chart-gridline {
  width: 100%;
  height: 1px;
  background: #f1f5f9;
}

.chart-gridline.bottom {
  background: #cbd5e1;
}

.chart-columns-flex {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 100%;
  position: relative;
  z-index: 2;
  padding-bottom: 14px;
}

.chart-column-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  height: 100%;
  justify-content: flex-end;
}

.chart-duo-bars-wrap {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 54px;
}

.chart-bar {
  width: 10px;
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease;
}

.chart-bar.bar-emerald {
  background: #10b981;
}

.chart-bar.bar-amber {
  background: #f59e0b;
}

.chart-col-label {
  position: absolute;
  bottom: 0;
  font-size: 0.54rem;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.analytics-bottom-legend {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.6rem;
  color: #475569;
  font-weight: 600;
  padding-top: 0.15rem;
  border-top: 1px solid #f1f5f9;
}

.analytics-legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.legend-line {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  display: inline-block;
}

.legend-line.emerald {
  background: #10b981;
}

.legend-line.amber {
  background: #f59e0b;
}

.chart-col-tooltip {
  display: none;
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.chart-column-item:hover .chart-col-tooltip {
  display: block;
}

/* Dashboard Main Layout (Desk Panel on Left + Guidance on Right) */
.clerk-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 1100px) {
  .clerk-main-layout {
    grid-template-columns: 1fr;
  }
}

.clerk-desk-panel {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
}

.clerk-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.activity-feed-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.activity-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #f1f5f9;
}

.activity-feed-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-live-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: #10b981;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1.5px 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.activity-feed-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
  flex: 1;
  overflow: hidden;
}

.activity-item {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  cursor: pointer;
}

.activity-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: translateX(3px);
}

.activity-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.activity-item-icon.success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.activity-item-icon.info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.activity-item-icon.warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.activity-item-icon.danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.activity-item-icon.neutral { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.activity-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-item-title {
  font-size: 0.76rem;
  font-weight: 750;
  color: #123B4A;
  line-height: 1.2;
}

.activity-item-sub {
  font-size: 0.68rem;
  color: #475569;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item-time {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
}

body.dark-mode .activity-item {
  background: #153e4d;
  border-color: #205e74;
}

body.dark-mode .activity-item:hover {
  background: #1a4f62;
}

body.dark-mode .activity-feed-header {
  border-bottom-color: #205e74;
}

/* Desk Table & Pagination */
.desk-table-container {
  overflow-x: auto;
  margin-top: 0.45rem;
}

.desk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.desk-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-bottom: 1.5px solid #e2e8f0;
  font-size: 0.72rem;
}

.desk-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.desk-table tr:hover td {
  background: #fbfcfe;
}

.app-cell-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-building-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.occupancy-tag-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.app-meta-pills-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 1px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.67rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

/* Application No Pill (Clickable / Interactive) */
.meta-pill.app-no-pill {
  background: #F0F9FF;
  border-color: #BAE6FD;
  color: #0369A1;
  cursor: pointer;
}
.meta-pill.app-no-pill .meta-pill-label {
  color: #0284C7;
  font-weight: 600;
  font-size: 0.62rem;
}
.meta-pill.app-no-pill .meta-pill-val {
  color: #0369A1;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
}
.meta-pill.app-no-pill:hover {
  background: #E0F2FE;
  border-color: #7DD3FC;
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

/* Applicant Name Pill */
.meta-pill.applicant-pill {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #334155;
}
.meta-pill.applicant-pill .meta-pill-icon {
  color: #64748B;
  flex-shrink: 0;
}
.meta-pill.applicant-pill .meta-pill-text {
  font-weight: 600;
  color: #1E293B;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta-pill.applicant-pill:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

/* Property No Pill */
.meta-pill.property-no-pill {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}
.meta-pill.property-no-pill .meta-pill-icon {
  color: #D97706;
  flex-shrink: 0;
}
.meta-pill.property-no-pill .meta-pill-label {
  color: #B45309;
  font-weight: 600;
  font-size: 0.62rem;
}
.meta-pill.property-no-pill .meta-pill-val {
  color: #92400E;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
}
.meta-pill.property-no-pill:hover {
  background: #FDE68A;
  border-color: #FCD34D;
}

/* Submission Date Column Styling */
.submission-date-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  user-select: none;
}

.submission-date-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}

.submission-date-icon {
  color: #0284c7;
  flex-shrink: 0;
}

.submission-time-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
  flex-wrap: wrap;
}

.submission-clock-text {
  font-weight: 500;
  color: #64748b;
}

.submission-fresh-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #15803d;
  background: #ecfdf5;
  border: 1px solid #86efac;
  padding: 1px 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.submission-urgent-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1px 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.submission-elapsed-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

/* Status & Stage Cell Styling */
.status-cell-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.status-stage-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
  flex-wrap: wrap;
}

.status-owner-text {
  font-weight: 500;
  color: #64748b;
}

.status-sla-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.status-sla-chip.urgent {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.status-sla-chip.today {
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.status-sla-chip.normal {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.stage-badge.under-scrutiny {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.stage-badge.stage-survey {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.stage-badge.stage-report {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.stage-badge.stage-reinspect {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.stage-badge.stage-returned {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.stage-badge.stage-approved {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #86efac;
}

.stage-badge.stage-rejected {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.stage-owner-sub {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 2px;
}

.next-action-text {
  font-weight: 700;
  color: #123B4A;
  font-size: 0.75rem;
}

.sla-pill-urgent {
  background: #fee2e2;
  color: #D94A27;
  border: 1px solid #fca5a5;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.normal-submission-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.app-id-pill {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
}

.desk-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-btn,
.pagination-page-num {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled),
.pagination-page-num:hover {
  border-color: #123B4A;
  color: #123B4A;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-page-num.active {
  background: #123B4A;
  color: #ffffff;
  border-color: #123B4A;
}

.desk-quick-filters-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Occupancy Workload & SLA Vertical Bar Diagram Widget
   ========================================================================== */
.clerk-barchart-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 160px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.barchart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #f1f5f9;
}

.barchart-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.barchart-sub {
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1;
  margin-top: 1px;
}

.barchart-sla-badge {
  font-size: 0.62rem;
  font-weight: 800;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #86efac;
  padding: 2px 7px;
  border-radius: 9999px;
  white-space: nowrap;
}

.barchart-plot-container {
  display: flex;
  gap: 0.5rem;
  height: 90px;
  align-items: flex-end;
  position: relative;
  margin: 0.15rem 0;
}

.barchart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 70px;
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 18px;
  width: 14px;
  text-align: right;
  user-select: none;
}

.barchart-grid-area {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.barchart-grid-lines {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}

.barchart-grid-line {
  border-bottom: 1px dashed #e2e8f0;
  width: 100%;
}

.barchart-grid-line.bottom-axis {
  border-bottom: 1.5px solid #cbd5e1;
}

.barchart-columns-wrap {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 100%;
  position: relative;
  z-index: 2;
  padding: 0 4px;
}

.barchart-col-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  width: 64px;
  padding: 2px 2px 1px;
  border-radius: 6px;
}

.barchart-col-group:hover,
.barchart-col-group.active-col {
  background: rgba(217, 74, 39, 0.08);
  border-radius: 6px;
}

.barchart-col-group.active-col .barchart-col-label {
  color: #D94A27;
  font-weight: 800;
}

.barchart-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #123B4A;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.6rem;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.barchart-col-group:hover .barchart-tooltip {
  opacity: 1;
}

.barchart-bars-pair {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 70px;
  width: 100%;
  justify-content: center;
}

.vbar {
  width: 14px;
  max-height: 100%;
  border-radius: 4px 4px 0 0;
  transition: transform 0.15s ease, filter 0.15s ease;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 1px;
}

.vbar:hover {
  filter: brightness(1.1);
  transform: scaleY(1.04);
}

.vbar-count {
  font-size: 0.56rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.vbar-empty-slot {
  width: 12px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
}

.vbar-cleared {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.vbar-scrutiny {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.vbar-rejected {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.barchart-col-label {
  font-size: 0.6rem;
  color: #334155;
  font-weight: 700;
  white-space: nowrap;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.barchart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.2rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.58rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.barchart-legend-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.58rem;
  font-weight: 600;
  color: #475569;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.dot-cleared {
  background: #10b981;
}

.legend-dot.dot-scrutiny {
  background: #f59e0b;
}

.legend-dot.dot-rejected {
  background: #ef4444;
}

.barchart-reset-btn {
  background: #fee2e2;
  color: #D94A27;
  border: 1px solid #fca5a5;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.barchart-reset-btn:hover {
  background: #D94A27;
  color: #ffffff;
}

.barchart-stat-hint {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   Today's Scheduled Panchnamas Widget
   ========================================================================== */
.clerk-panchnama-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 148px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.panchnama-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #f1f5f9;
}

.panchnama-card-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #123B4A;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.panchnama-card-sub {
  font-size: 0.58rem;
  color: #64748b;
  line-height: 1;
  margin-top: 1px;
}

.panchnama-badge-active {
  font-size: 0.58rem;
  font-weight: 800;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 1px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

.panchnama-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.15rem 0;
}

.panchnama-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.panchnama-item-row:hover {
  background: #ffffff;
  border-color: #D94A27;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(217, 74, 39, 0.08);
}

.panchnama-item-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.panchnama-item-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.panchnama-item-info {
  min-width: 0;
}

.panchnama-item-name {
  font-size: 0.68rem;
  font-weight: 800;
  color: #123B4A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.panchnama-item-meta {
  font-size: 0.58rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  margin-top: 1px;
}

.panchnama-item-right {
  flex-shrink: 0;
  margin-left: 0.45rem;
}

.panchnama-time-pill {
  font-size: 0.58rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

.panchnama-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.2rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.58rem;
  color: #64748b;
  margin-top: 0.1rem;
}

/* ==========================================================================
   Discrepancy & Return Handling Interactive Action Buttons
   ========================================================================== */
.btn-return-corr {
  flex: 1;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  color: #c2410c;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.44rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(194, 65, 12, 0.05);
}

.btn-return-corr:hover {
  background: #ea580c;
  border-color: #c2410c;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.btn-return-corr:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.2);
}

.btn-reject-file {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #D94A27;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.44rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(217, 74, 39, 0.05);
}

.btn-reject-file:hover {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-reject-file:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

body.dark-mode .btn-return-corr {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.35);
  color: #fb923c;
}

body.dark-mode .btn-return-corr:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
}

body.dark-mode .btn-reject-file {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

body.dark-mode .btn-reject-file:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.panchnama-footer-hint {
  font-size: 0.56rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ==========================================================================
   Screen 2: 3-Column Scrutiny Layout & In-Line Document Viewer
   ========================================================================== */
.scrutiny-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.55rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  overflow-x: auto;
}

.scrutiny-step-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.scrutiny-step-item.active {
  background: #D94A27;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
}

.scrutiny-step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.scrutiny-step-item.active .scrutiny-step-circle {
  background: #ffffff;
  color: #D94A27;
}

.scrutiny-grid-2col {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 1.15rem;
  align-items: stretch;
  width: 100%;
}

.scrutiny-grid-2col .doc-table-custom tbody td {
  padding: 0.62rem 0.75rem;
}

.scrutiny-grid-2col .doc-table-custom thead th {
  padding: 0.55rem 0.75rem;
}

.scrutiny-grid-3col {
  display: grid;
  grid-template-columns: 290px minmax(340px, 1.15fr) minmax(360px, 1fr);
  gap: 0.85rem;
  align-items: stretch;
  width: 100%;
}

.scrutiny-left-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

.scrutiny-left-col .card-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 1350px) {
  .scrutiny-grid-3col {
    grid-template-columns: 275px 1fr 1fr;
    gap: 0.65rem;
  }
}

@media (max-width: 1080px) {
  .scrutiny-grid-2col,
  .scrutiny-grid-3col {
    grid-template-columns: 1fr;
  }
}

/* Document Table Styling */
.doc-table-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
}

.doc-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.doc-filter-tabs {
  display: flex;
  gap: 0.35rem;
}

.doc-filter-tab {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-filter-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.doc-filter-tab.active {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}

.doc-search-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
}

.doc-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.75rem;
  color: #0f172a;
  width: 130px;
}

.doc-table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.775rem;
}

.doc-table-custom thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.65rem;
  border-bottom: 1.5px solid #e2e8f0;
}

.doc-table-custom tbody tr {
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-table-custom tbody tr:hover {
  background: #f8fafc;
}

.doc-table-custom tbody tr.active-doc-row {
  background: #eff6ff !important;
}

.doc-table-custom tbody td {
  padding: 0.55rem 0.65rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

/* Document Icon and Badges */
.doc-type-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-type-icon-box.is-pdf {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.doc-type-icon-box.is-img {
  background: #dbeafe;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.doc-badge-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 4px;
  text-align: center;
}

.doc-badge-pill.pill-pdf {
  background: #fee2e2;
  color: #dc2626;
}

.doc-badge-pill.pill-jpg {
  background: #dbeafe;
  color: #2563eb;
}

/* Status Badges */
.stat-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}

.stat-badge-rejected {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Modern Action Buttons */
.btn-doc-action-modern {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  color: #ea580c;
  padding: 3px 11px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.05);
  white-space: nowrap;
}

.btn-doc-action-modern:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.22);
}

.btn-doc-more {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-doc-more:hover {
  background: #f1f5f9;
  color: #334155;
}

/* Inline Document Viewer Panel - Standardized Same Size */
.inline-viewer-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 610px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.inline-viewer-header {
  padding: 0.65rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.inline-viewer-title {
  font-size: 0.825rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-viewer-toolbar {
  background: #27272a;
  color: #e4e4e7;
  padding: 0.35rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.inline-viewer-toolbar-left,
.inline-viewer-toolbar-center,
.inline-viewer-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.inline-viewer-btn {
  background: none;
  border: none;
  color: #e4e4e7;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inline-viewer-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}

.inline-viewer-canvas {
  background: #334155;
  padding: 1rem 0.85rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.doc-canvas-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.doc-canvas-nav-btn:hover:not(:disabled) {
  background: #123B4A;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.08);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.doc-canvas-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.doc-canvas-nav-prev {
  left: 10px;
}

.doc-canvas-nav-next {
  right: 10px;
}

.inline-paper-frame {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  padding: 1.15rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0f172a;
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 470px;
  height: 470px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.inline-viewer-decision-bar {
  flex-shrink: 0;
}

/* Standardized Document Preview Popup (Exact Same Size Window For All Documents) */
.doc-viewer-card {
  width: 760px !important;
  max-width: 92vw !important;
  height: 590px !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 60px -15px rgba(0,0,0,0.45) !important;
  background: #ffffff !important;
}

.doc-preview-body {
  flex: 1 !important;
  height: 470px !important;
  max-height: 470px !important;
  overflow-y: auto !important;
  background: #f1f5f9 !important;
  padding: 1rem !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
}

.paper-doc-frame {
  background: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #e2e8f0 !important;
  padding: 1.25rem 1.4rem !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  color: #0f172a !important;
  position: relative !important;
  width: 100% !important;
  max-width: 690px !important;
  min-height: 440px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Quick Document Dossier Modal Styling */
.dossier-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  transition: all 0.15s ease;
}

.dossier-item-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Statutory 13-Stage Workflow Status System (Clean, Attractive, Interactive)
   ========================================================================== */
.statutory-status-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 28px;
}

.statutory-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.statutory-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  transition: all 0.18s ease;
  cursor: default;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.statutory-status-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.statutory-icon {
  font-size: 11px;
  line-height: 1;
  display: inline-block;
}

.statutory-name {
  letter-spacing: -0.01em;
}

/* 1. Scrutiny Pending */
.status-scrutiny-pending {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* 2. Scrutiny In Progress */
.status-scrutiny-progress {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

/* 3. Survey Scheduled */
.status-survey-scheduled {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* 4. Survey In Progress */
.status-survey-progress {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

/* 5. Survey Completed */
.status-survey-completed {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

/* 6. Inspection Report Pending */
.status-report-pending {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

/* 7. Compliance Pending */
.status-compliance-pending {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

/* 8. Re-inspection Required */
.status-reinspection-required {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* 8. Compliance Verified */
.status-compliance-verified {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
}

/* 9. Certificate Issued */
.status-cert-issued {
  background: #f0fdf4;
  color: #14532d;
  border: 1px solid #4ade80;
  box-shadow: 0 1px 3px rgba(20, 83, 45, 0.12);
}

/* 0. Disallowed / Rejected */
.status-rejected {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* SLA Urgency Badges */
.statutory-sla-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 9999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.statutory-sla-chip.urgent {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  animation: pulse-urgent-subtle 2.5s infinite;
}

.statutory-sla-chip.today {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

@keyframes pulse-urgent-subtle {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  }
}

/* ==========================================================================
   Application History & Audit Ledger System
   ========================================================================== */
.history-view-wrapper {
  padding: 1.25rem 1.75rem;
  background: #f8fafc;
  min-height: calc(100vh - 70px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.history-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.history-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-hero-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.history-toolbar {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  flex-wrap: wrap;
}

.history-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.history-filter-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-filter-chip:hover {
  background: #e2e8f0;
}

.history-filter-chip.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

/* Vertical Lifecycle Timeline Modal Styles */
.app-timeline-list {
  position: relative;
  padding-left: 28px;
  margin: 0.75rem 0;
}

.app-timeline-list::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e2e8f0;
}

.app-timeline-node {
  position: relative;
  margin-bottom: 1.25rem;
}

.app-timeline-node:last-child {
  margin-bottom: 0;
}

.app-timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 2;
}

.app-timeline-node.applicant .app-timeline-dot {
  border-color: #0284c7;
  color: #0284c7;
}

.app-timeline-node.clerk .app-timeline-dot {
  border-color: #ea580c;
  color: #ea580c;
}

.app-timeline-node.inspector .app-timeline-dot {
  border-color: #16a34a;
  color: #16a34a;
}

.app-timeline-node.cfo .app-timeline-dot {
  border-color: #7e22ce;
  color: #7e22ce;
}

.app-timeline-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.app-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 6px;
}

.app-timeline-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.app-timeline-time {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

.app-timeline-desc {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 6px;
}

.app-timeline-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  border-top: 1px dashed #f1f5f9;
  padding-top: 6px;
  margin-top: 4px;
}

/* Compliance Row Color Shading */
tr.row-compliant-green,
tr.row-compliant-green td {
  background-color: #f0fdf4 !important;
}
tr.row-compliant-green:hover,
tr.row-compliant-green:hover td {
  background-color: #dcfce7 !important;
}

tr.row-deficient-red,
tr.row-deficient-red td {
  background-color: #fff1f2 !important;
}
tr.row-deficient-red:hover,
tr.row-deficient-red:hover td {
  background-color: #ffe4e6 !important;
}

/* ==========================================================================
   STATUTORY 13-STAGE WORKFLOW STATUS PILLS & BADGES (Clean & Interactive)
   ========================================================================== */
.statutory-pill-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.statutory-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.statutory-status-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.statutory-status-badge .badge-icon {
  font-size: 12px;
  line-height: 1;
  display: inline-block;
}

.statutory-status-badge .badge-label {
  display: inline-block;
}

/* Stage 1: Scrutiny Pending (Warm Amber) */
.status-scrutiny-pending {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.status-scrutiny-pending:hover {
  background-color: #fef3c7;
  border-color: #fcd34d;
}

/* Stage 2: Scrutiny In Progress (Vibrant Blue) */
.status-scrutiny-progress {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.status-scrutiny-progress:hover {
  background-color: #dbeafe;
  border-color: #93c5fd;
}

/* Stage 3: Ready for Survey (Teal) */
.status-ready-survey {
  background-color: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}
.status-ready-survey:hover {
  background-color: #ccfbf1;
  border-color: #5eead4;
}

/* Stage 4: Survey Scheduled (Indigo) */
.status-survey-scheduled {
  background-color: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.status-survey-scheduled:hover {
  background-color: #e0e7ff;
  border-color: #a5b4fc;
}

/* Stage 5: Survey In Progress (Sky Blue) */
.status-survey-progress {
  background-color: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.status-survey-progress:hover {
  background-color: #e0f2fe;
  border-color: #7dd3fc;
}

/* Stage 6: Survey Completed (Cyan / Teal) */
.status-survey-completed {
  background-color: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}
.status-survey-completed:hover {
  background-color: #cffafe;
  border-color: #67e8f9;
}

/* Stage 7: Inspection Report Pending (Orange / Coral) */
.status-report-pending {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.status-report-pending:hover {
  background-color: #ffedd5;
  border-color: #fdba74;
}

/* Stage 8: Verification Pending (Purple) */
.status-verification {
  background-color: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}
.status-verification:hover {
  background-color: #f3e8ff;
  border-color: #d8b4fe;
}

/* Stage 9: Compliance Pending (Rose / Pink) */
.status-compliance-pending {
  background-color: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.status-compliance-pending:hover {
  background-color: #ffe4e6;
  border-color: #fda4af;
}

/* Stage 10: Re-inspection Required (Amber / Red Accent) */
.status-reinspect {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.status-reinspect:hover {
  background-color: #fee2e2;
  border-color: #f87171;
}

/* Stage 11: Compliance Verified (Emerald Green) */
.status-compliance-verified {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-compliance-verified:hover {
  background-color: #d1fae5;
  border-color: #6ee7b7;
}

/* Stage 12: Certificate Ready (Mint / Forest) */
.status-cert-ready {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.status-cert-ready:hover {
  background-color: #dcfce7;
  border-color: #86efac;
}

/* Stage 13: Certificate Issued (Rich Royal Emerald) */
.status-cert-issued {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.25);
}
.status-cert-issued:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}

/* Disallowed / Rejected */
.status-rejected {
  background-color: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}
.status-rejected:hover {
  background-color: #fce7f3;
  border-color: #f472b6;
}

/* SLA Urgency Pill */
.stat-sla-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  line-height: 1.3;
}

.stat-sla-pill.sla-warning {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.stat-sla-pill.sla-danger {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  animation: pulse-border 2s infinite ease-in-out;
}

@keyframes pulse-border {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.stat-sla-pill.sla-ok {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Table Action Capsule & Interactive Buttons
   ========================================================================== */
.desk-action-capsule {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}

.btn-capsule-history,
.btn-capsule-doc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  outline: none;
  user-select: none;
}

.btn-capsule-history svg,
.btn-capsule-doc svg {
  color: #64748b;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.btn-capsule-history:hover,
.btn-capsule-doc:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15);
  transform: translateY(-1px);
}

.btn-capsule-history:hover svg,
.btn-capsule-doc:hover svg {
  color: #0284c7;
}

.btn-capsule-history:active,
.btn-capsule-doc:active {
  transform: translateY(0);
  background: #f1f5f9;
}

.btn-capsule-scrutinize {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #15803d;
  color: #ffffff !important;
  border: 1px solid #166534;
  border-radius: 6px;
  padding: 0 12px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.25);
  white-space: nowrap;
}

.btn-capsule-scrutinize:hover {
  background: #166534;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.35);
  transform: translateY(-1px);
}

.btn-capsule-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #D94A27;
  color: #ffffff !important;
  border: 1px solid #bf3d1e;
  border-radius: 6px;
  padding: 0 12px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(217, 74, 39, 0.25);
  white-space: nowrap;
}

.btn-capsule-primary:hover {
  background: #bf3d1e;
  box-shadow: 0 2px 6px rgba(217, 74, 39, 0.35);
  transform: translateY(-1px);
}

.btn-capsule-urgent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #dc2626;
  color: #ffffff !important;
  border: 1px solid #b91c1c;
  border-radius: 6px;
  padding: 0 12px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
  white-space: nowrap;
  animation: pulse-border 2s infinite ease-in-out;
}

.btn-capsule-urgent:hover {
  background: #b91c1c;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  transform: translateY(-1px);
}

.btn-capsule-outline-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #bfdbfe;
  border-radius: 6px;
  padding: 0 10px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-capsule-outline-blue:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  transform: translateY(-1px);
}

.btn-capsule-outline-indigo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #eef2ff;
  color: #4338ca;
  border: 1.5px solid #c7d2fe;
  border-radius: 6px;
  padding: 0 10px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-capsule-outline-indigo:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
  transform: translateY(-1px);
}

.btn-capsule-rejection {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff1f2;
  color: #be123c;
  border: 1.5px solid #fecdd3;
  border-radius: 6px;
  padding: 0 10px;
  height: 28px;
  font-family: var(--font-sans);
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-capsule-rejection:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
  transform: translateY(-1px);
}

/* ==========================================================================
   Application Lifecycle & Statutory History Timeline Modal
   ========================================================================== */
.app-timeline-list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 28px;
}

.app-timeline-list::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 11px;
  width: 2px;
  background: #cbd5e1;
}

.app-timeline-node {
  position: relative;
  margin-bottom: 18px;
}

.app-timeline-node:last-child {
  margin-bottom: 0;
}

.app-timeline-dot {
  position: absolute;
  left: -28px;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 2;
}

.app-timeline-node.applicant .app-timeline-dot {
  border-color: #0284c7;
  background: #e0f2fe;
}

.app-timeline-node.clerk .app-timeline-dot {
  border-color: #ea580c;
  background: #ffedd5;
}

.app-timeline-node.inspector .app-timeline-dot {
  border-color: #0f766e;
  background: #ccfbf1;
}

.app-timeline-node.cfo .app-timeline-dot {
  border-color: #15803d;
  background: #dcfce7;
}

.app-timeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.app-timeline-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
}

.app-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 6px;
}

.app-timeline-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.app-timeline-time {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

.app-timeline-desc {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 6px;
}

.app-timeline-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   13-STAGE STATUTORY STATUS BADGES & INTERACTIVE CHIPS
   ========================================================================== */
.statutory-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.statutory-status-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 1. Scrutiny Pending */
.status-scrutiny-pending {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}
.status-scrutiny-pending .status-dot-pulse { background: #3b82f6; }

/* 2. Scrutiny In Progress */
.status-scrutiny-progress {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}
.status-scrutiny-progress .status-dot-pulse { background: #14b8a6; }

/* 3. Ready for Survey */
.status-ready-survey {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.status-ready-survey .status-dot-pulse { background: #10b981; }

/* 4. Survey Scheduled */
.status-survey-scheduled {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.status-survey-scheduled .status-dot-pulse { background: #0284c7; }

/* 5. Survey In Progress */
.status-survey-progress {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.status-survey-progress .status-dot-pulse { background: #8b5cf6; }

/* 6. Survey Completed */
.status-survey-completed {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.status-survey-completed .status-dot-pulse { background: #22c55e; }

/* 7. Inspection Report Pending */
.status-report-pending {
  background: #fefce8;
  color: #a16207;
  border-color: #fef08a;
}
.status-report-pending .status-dot-pulse { background: #eab308; }

/* 8. Verification Pending */
.status-verification {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.status-verification .status-dot-pulse { background: #6366f1; }

/* 9. Compliance Pending */
.status-compliance-pending {
  background: #fff7ed;
  color: #c2410c;
  border-color: #ffedd5;
}
.status-compliance-pending .status-dot-pulse { background: #f97316; }

/* 10. Re-inspection Required */
.status-reinspect {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}
.status-reinspect .status-dot-pulse { background: #f43f5e; }

/* 11. Compliance Verified */
.status-compliance-verified {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}
.status-compliance-verified .status-dot-pulse { background: #16a34a; }

/* 12. Certificate Ready */
.status-cert-ready {
  background: #f0fdfa;
  color: #115e59;
  border-color: #5eead4;
}
.status-cert-ready .status-dot-pulse { background: #0d9488; }

/* 13. Certificate Issued */
.status-cert-issued {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}
.status-cert-issued .status-dot-pulse { background: #059669; }

/* 14. Rejected / Disallowed */
.status-rejected {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.status-rejected .status-dot-pulse { background: #ef4444; }

/* SLA Chips in Status Cell */
.status-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.status-sla-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
}

.status-sla-chip.urgent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-sla-chip.normal {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}