/* ==========================================
   Check Ledger Premium Design System
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
  /* Primary & Accent Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-900: #1e3a8a;

  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;

  /* Neutral Slate Palette */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Status Colors */
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --emerald-700: #047857;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;

  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --rose-700: #be123c;

  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-600: #9333ea;

  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-600: #0284c7;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f6f8fa;
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Typography Utilities */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

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

.font-extrabold {
  font-weight: 800;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

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

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

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

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

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

.text-primary {
  color: var(--primary-600);
}

/* Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgba(239, 246, 255, 0.7) 0%, rgba(246, 248, 250, 1) 90%);
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navbar */
.topbar {
  height: 4.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--slate-900);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-icon-box {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--primary-600), var(--indigo-600));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.85rem;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
}

.user-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-500), var(--purple-600));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--slate-600);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-fast);
  margin-bottom: 0.35rem;
}

.nav-link:hover {
  background: var(--slate-100);
  color: var(--slate-900);
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary-600), var(--indigo-600));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.nav-link .icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

/* Content Area */
.content-body {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title-group h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.025em;
}

.page-title-group p {
  color: var(--slate-500);
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

/* Grid & Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.status-cards-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .status-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .status-cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}


.card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}

.card-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  padding: 0.95rem 1.15rem;
}

.card-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-600), var(--indigo-600));
  opacity: 0;
  transition: var(--transition-fast);
}

.card-hero:hover::before {
  opacity: 1;
}

.card-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.card-hero-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-blue {
  background: var(--primary-50);
  color: var(--primary-600);
}

.icon-indigo {
  background: #e0e7ff;
  color: var(--indigo-600);
}

.icon-emerald {
  background: var(--emerald-50);
  color: var(--emerald-600);
}

.icon-amber {
  background: var(--amber-50);
  color: var(--amber-600);
}

.icon-purple {
  background: var(--purple-50);
  color: var(--purple-600);
}

.icon-rose {
  background: var(--rose-50);
  color: var(--rose-600);
}

.card-hero .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
}

.card-hero .value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.25;
}

/* Status Pill Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.badge-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}

.badge-pending,
.badge-warning {
  background-color: var(--amber-50);
  color: var(--amber-700);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-cleared,
.badge-success {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-danger,
.badge-overdue {
  background-color: var(--rose-50);
  color: var(--rose-700);
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.badge-processed,
.badge-info {
  background-color: var(--sky-50);
  color: var(--sky-600);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-deposited,
.badge-purple {
  background-color: var(--purple-50);
  color: var(--purple-600);
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.badge-on-hold {
  background-color: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-300);
}

/* Custom Table Design */
.table-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.table-responsive {
  overflow-x: auto;
  overflow-y: auto;
  width: 100%;
  max-height: 480px;
  min-height: 220px;
  flex: 1;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem;
  table-layout: auto;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--slate-50);
  padding: 0.8rem 0.9rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  border-bottom: 2px solid var(--slate-300);
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--slate-200);
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:nth-child(even) td {
  background-color: #fafbfc;
}

.table tbody tr:hover td,
.table tbody tr:active td {
  background-color: var(--primary-50) !important;
}

.table td {
  padding: 0.85rem 0.85rem;
  border-bottom: 2px solid var(--slate-200); /* Crisp separator between rows */
  color: var(--slate-700);
  vertical-align: middle;
  line-height: 1.38;
  transition: var(--transition-fast);
}

.table tbody tr:last-child td {
  border-bottom: 1px solid var(--slate-200);
}

/* Mobile Table Scroll Indicator Hint */
.mobile-table-scroll-hint {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 600;
  border-bottom: 1px solid var(--slate-200);
}

.table th:first-child,
.table td:first-child {
  width: 48px;
  min-width: 48px;
  padding-right: 0.25rem;
}

.col-sn {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
}

.col-id {
  width: 65px !important;
  min-width: 65px !important;
  max-width: 65px !important;
}

.col-client {
  min-width: 200px !important;
}

.col-name {
  min-width: 130px !important;
}

.col-number {
  min-width: 115px !important;
}

.col-amount {
  min-width: 120px !important;
}

.col-date {
  min-width: 105px !important;
}

.col-notes {
  min-width: 140px !important;
}

.col-status {
  min-width: 100px !important;
}

.col-actions {
  min-width: 145px !important;
}

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

.table tbody tr:hover td {
  background: var(--slate-50);
}

/* Enhanced Pagination Bar */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--slate-200);
  background: var(--slate-50);
  flex-wrap: wrap;
}

.pagination-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-size-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
}

.page-size-select {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-800);
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  width: auto;
}

.page-size-select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.pagination-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--slate-600);
  font-weight: 600;
  white-space: nowrap;
}

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

.page-nav-btn,
.page-num-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--slate-300);
  background: #ffffff;
  color: var(--slate-700);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.page-nav-btn:hover:not(:disabled),
.page-num-btn:hover:not(.active) {
  background: var(--slate-100);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

.page-num-btn.active {
  background: linear-gradient(135deg, var(--primary-600), var(--indigo-600));
  border-color: var(--primary-600);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.page-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--slate-100);
}

/* User / Client Cell Avatar */
.client-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.client-cell>img,
.client-cell>.client-avatar {
  flex-shrink: 0;
}

.client-cell>div:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.client-cell .font-semibold,
.client-cell .text-xs {
  white-space: normal;
  overflow-wrap: anywhere;
}

.client-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--slate-200);
}

/* Code / Tag Pill */
.code-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: var(--slate-100);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  display: inline-block;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--indigo-600));
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--indigo-700));
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--slate-300);
  color: var(--slate-700);
}

.btn-secondary:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.btn-danger {
  background: var(--rose-50);
  border-color: rgba(225, 29, 72, 0.3);
  color: var(--rose-700);
}

.btn-danger:hover {
  background: var(--rose-600);
  color: #ffffff;
}

.btn-icon {
  padding: 0.4rem;
  border-radius: var(--radius-md);
  color: var(--slate-500);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Forms & Inputs */
.form-card {
  max-width: 48rem;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-grid.two {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--slate-900);
  background: #ffffff;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--slate-400);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  background: #ffffff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

/* Login Page Spec */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10;
}

/* Physical Check Representation Card */
.digital-check-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.digital-check-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(180deg, var(--primary-600), var(--indigo-600));
}

.check-watermark {
  position: absolute;
  right: 1.5rem;
  bottom: 1rem;
  opacity: 0.05;
  font-size: 5rem;
  font-weight: 900;
  pointer-events: none;
}

/* Utility Flex & Spacing */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.w-full {
  width: 100%;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

/* Schedule & Risk Alerts Card Styles */
.risk-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.risk-alert-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.risk-alert-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.risk-alert-card.overdue {
  border-left: 4px solid var(--rose-600);
  background: linear-gradient(135deg, #ffffff 0%, var(--rose-50) 100%);
}

.risk-alert-card.upcoming {
  border-left: 4px solid var(--amber-600);
  background: linear-gradient(135deg, #ffffff 0%, var(--amber-50) 100%);
}

.risk-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.risk-icon-box {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.risk-icon-box.danger {
  background: var(--rose-100);
  color: var(--rose-700);
}

.risk-icon-box.warning {
  background: var(--amber-100);
  color: var(--amber-700);
}

.risk-title {
  font-weight: 700;
  font-size: 0.925rem;
  color: var(--slate-900);
}

.risk-desc {
  font-size: 0.785rem;
  color: var(--slate-500);
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Stat Masking & Privacy Blur Styles */
.card-eye-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-500);
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  outline: none;
}

.card-eye-btn:hover {
  color: var(--primary-600);
  background: var(--primary-50);
  border-color: var(--primary-100);
  transform: scale(1.08);
}

.stat-maskable {
  transition: filter 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  user-select: text;
  display: inline-block;
}

.stat-maskable.is-blurred {
  filter: blur(6px);
  user-select: none;
  opacity: 0.7;
}

.btn-active-privacy {
  background: var(--amber-50) !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
  color: var(--amber-700) !important;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.15) !important;
}

/* ==========================================
   Mobile & Responsive Layout Enhancements
   ========================================== */

/* Mobile Sidebar & Drawer Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-close-btn {
  display: none;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-close-btn:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.mobile-menu-btn {
  display: none;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.mobile-brand-title {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon-box.sm-box {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--radius-sm);
}

/* Desktop & Large Screens (>= 769px): Ensure mobile menu elements are strictly hidden */
@media (min-width: 769px) {
  .mobile-menu-btn,
  .sidebar-close-btn,
  .mobile-brand-title {
    display: none !important;
  }

  .sidebar {
    position: static !important;
    transform: none !important;
    display: flex !important;
    width: 260px !important;
    box-shadow: none !important;
  }

  .sidebar-overlay {
    display: none !important;
    visibility: hidden !important;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    width: 280px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-brand-title {
    display: flex;
  }

  .date-display {
    display: none;
  }

  .topbar {
    padding: 0 1rem;
  }

  .content-body {
    padding: 1rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Screens (< 640px) */
@media (max-width: 639px) {
  .topbar {
    padding: 0 0.85rem;
    height: 3.75rem;
  }

  .user-name {
    display: none;
  }

  .status-badge-topbar {
    display: none;
  }

  .content-body {
    padding: 0.85rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .page-header>div:last-child,
  .page-header .flex {
    width: 100%;
    justify-content: space-between;
  }

  .page-header .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .page-title-group h1 {
    font-size: 1.35rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.15rem;
  }

  .card-hero .value {
    font-size: 1.5rem;
  }

  .table-header-toolbar {
    padding: 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .table-header-toolbar>div,
  .table-header-toolbar input,
  .table-header-toolbar .flex {
    width: 100%;
  }

  /* Horizontal swipeable pill strip for filters on mobile */
  .filter-btns-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 0.25rem 0.1rem 0.45rem !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }

  .filter-btns-group::-webkit-scrollbar {
    display: none !important;
  }

  .filter-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: center;
    padding: 0.45rem 0.95rem !important;
    font-size: 0.78rem !important;
    border-radius: 9999px !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .form-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .form-grid.two {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .form-actions-bar {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .form-actions-bar .btn {
    width: 100% !important;
    min-height: 46px;
    font-size: 0.92rem !important;
    justify-content: center !important;
  }

  /* Compact BS Date Picker for small screens */
  .bs-date-selects {
    display: flex !important;
    gap: 0.3rem !important;
    width: 100% !important;
  }

  .bs-date-selects select {
    flex: 1 !important;
    min-width: 0 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.2rem !important;
  }

  .date-mode-toggle {
    width: 100% !important;
    display: flex !important;
  }

  .date-mode-btn {
    flex: 1 !important;
    justify-content: center !important;
    padding: 0.4rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  .digital-check-card {
    padding: 1rem;
  }

  /* Prevent iOS zoom on input focus by keeping font size 1rem */
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  select,
  textarea {
    font-size: 1rem !important;
  }
}

/* ==========================================
   Dashboard: Alert Bar
   ========================================== */
.dashboard-alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.dashboard-alert-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dashboard-alert-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.alert-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-md);
  min-width: 5rem;
  text-align: center;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.alert-badge-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-hero-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.filter-btn {
  transition: all var(--transition-fast);
  font-weight: 600;
}

/* Custom Active Colors for Check List Tabs */
.filter-btn[data-filter="all"].active {
  background-color: var(--slate-900) !important;
  color: #ffffff !important;
  border-color: var(--slate-900) !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.3);
}

.filter-btn[data-filter="pending"].active {
  background-color: #d97706 !important;
  /* Amber */
  color: #ffffff !important;
  border-color: #b45309 !important;
  box-shadow: 0 2px 5px rgba(217, 119, 6, 0.3);
}

.filter-btn[data-filter="processed"].active {
  background-color: #4f46e5 !important;
  /* Indigo */
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

.filter-btn[data-filter="deposited"].active {
  background-color: #7c3aed !important;
  /* Purple */
  color: #ffffff !important;
  border-color: #6d28d9 !important;
  box-shadow: 0 2px 5px rgba(124, 58, 237, 0.3);
}

.filter-btn[data-filter="cleared"].active {
  background-color: #059669 !important;
  /* Emerald Green */
  color: #ffffff !important;
  border-color: #047857 !important;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.3);
}

.filter-btn[data-filter="on-hold"].active {
  background-color: #e11d48 !important;
  /* Crimson / Rose */
  color: #ffffff !important;
  border-color: #be123c !important;
  box-shadow: 0 2px 5px rgba(225, 29, 72, 0.3);
}

.filter-btn[data-filter="overdue"].active {
  background-color: #dc2626 !important;
  /* Red */
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.35);
}

.filter-btn[data-filter="due-today"].active {
  background-color: #0d9488 !important;
  /* Teal */
  color: #ffffff !important;
  border-color: #0f766e !important;
  box-shadow: 0 2px 5px rgba(13, 148, 136, 0.3);
}

.filter-btn[data-filter="due-tomorrow"].active {
  background-color: #0284c7 !important;
  /* Sky Blue */
  color: #ffffff !important;
  border-color: #0369a1 !important;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.3);
}

/* Tab Hover States */
.filter-btn[data-filter="pending"]:hover:not(.active) {
  background-color: var(--amber-50);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.3);
}

.filter-btn[data-filter="processed"]:hover:not(.active) {
  background-color: var(--indigo-50);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.3);
}

.filter-btn[data-filter="deposited"]:hover:not(.active) {
  background-color: #f3e8ff;
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.3);
}

.filter-btn[data-filter="cleared"]:hover:not(.active) {
  background-color: var(--emerald-50);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

.filter-btn[data-filter="on-hold"]:hover:not(.active) {
  background-color: var(--rose-50);
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.3);
}

.filter-btn[data-filter="overdue"]:hover:not(.active) {
  background-color: var(--rose-50);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.filter-btn[data-filter="due-today"]:hover:not(.active) {
  background-color: #ccfbf1;
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.3);
}

.filter-btn[data-filter="due-tomorrow"]:hover:not(.active) {
  background-color: var(--sky-50);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

.alert-badge-count {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.alert-badge-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
  opacity: 0.8;
}

.alert-badge-overdue {
  background: var(--rose-50);
  color: var(--rose-700);
  border-color: rgba(225, 29, 72, 0.15);
}

.alert-badge-warning {
  background: var(--amber-50);
  color: var(--amber-700);
  border-color: rgba(217, 119, 6, 0.15);
}

.alert-badge-success {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border-color: rgba(5, 150, 105, 0.15);
}

.alert-badge-tomorrow {
  background: var(--sky-50);
  color: var(--sky-700);
  border-color: rgba(14, 165, 233, 0.18);
}

/* ==========================================
   Dashboard: Desktop Table / Mobile Card Switch
   ========================================== */
.desktop-table {
  display: block;
}

.mobile-check-list {
  display: none;
}

/* ==========================================
   Dashboard: Mobile Check Card
   ========================================== */
.mobile-check-card {
  display: block;
  padding: 1.15rem 1.25rem;
  border-bottom: 2.5px solid #cbd5e1 !important; /* Prominent separator between check cards */
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
  background: #ffffff;
}

.mobile-check-card:nth-child(even) {
  background: #f8fafc;
}

.mobile-check-card:last-child {
  border-bottom: none !important;
}

.mobile-check-card:hover,
.mobile-check-card:active {
  background: var(--primary-50) !important;
}

.mobile-check-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mobile-check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.mobile-check-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mobile-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

/* ==========================================
   Dashboard: Empty State Box
   ========================================== */
.empty-state-box {
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
}

/* Switch table↔cards at mobile breakpoint */
@media (max-width: 768px) {
  .desktop-table {
    display: none;
  }

  .mobile-check-list {
    display: block;
  }

  .dashboard-alert-bar {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .dashboard-alert-badges {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .alert-badge-item {
    flex: 1;
    padding: 0.5rem 0.5rem;
    min-width: unset;
  }

  .alert-badge-count {
    font-size: 1.25rem;
  }

  .mobile-check-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================
   Quick Status Dropdown
   ========================================== */
.quick-status-wrapper {
  position: relative;
  display: inline-flex;
}

.quick-status-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  background: linear-gradient(135deg, var(--primary-50), #f0f4ff);
  border-color: var(--primary-100);
  color: var(--primary-700);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.quick-status-trigger:hover {
  background: linear-gradient(135deg, var(--primary-100), #e0e9ff);
  border-color: var(--primary-500);
  color: var(--primary-700);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.quick-status-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14), 0 4px 10px rgba(15, 23, 42, 0.06);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  padding: 0.35rem 0;
  overflow: hidden;
}

.quick-status-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.qsd-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate-400);
  padding: 0.4rem 0.85rem 0.5rem;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 0.25rem;
}

.qsd-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
  color: var(--slate-700);
}

.qsd-option:hover {
  background: var(--slate-50);
}

.qsd-option.is-active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.qsd-option.pending:hover {
  background: var(--amber-50);
  color: var(--amber-700);
}

.qsd-option.deposited:hover {
  background: var(--sky-50);
  color: var(--sky-600);
}

.qsd-option.cleared:hover {
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.qsd-option.on-hold:hover {
  background: var(--slate-100);
  color: var(--slate-700);
}

.qsd-option.processed:hover {
  background: var(--sky-50);
  color: var(--sky-600);
}

.qsd-option.overdue:hover {
  background: var(--rose-50);
  color: var(--rose-700);
}

.qsd-option.qsd-loading {
  opacity: 0.6;
  pointer-events: none;
  cursor: wait;
}

/* ==========================================
   Toast Notification
   ========================================== */
.status-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--slate-900);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 320px;
}

.status-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status-toast.toast-error {
  background: var(--rose-600);
}

/* On small screens, push dropdown to the left to avoid overflow */
@media (max-width: 639px) {
  .quick-status-dropdown {
    right: auto;
    left: 0;
    transform-origin: top left;
    min-width: 170px;
  }

  .status-toast {
    left: 1rem;
    right: 1rem;
    max-width: unset;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ==========================================
   Photo Upload & Attachment Styles
   ========================================== */
.photo-upload-zone {
  position: relative;
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  overflow: hidden;
}

.photo-upload-zone:hover,
.photo-upload-zone.drag-active {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.photo-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.photo-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.photo-upload-icon-circle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.photo-upload-zone:hover .photo-upload-icon-circle {
  transform: scale(1.08);
}

.photo-upload-heading {
  font-weight: 700;
  color: var(--slate-800);
  font-size: 0.95rem;
  display: block;
}

.photo-upload-subtext {
  font-size: 0.75rem;
  color: var(--slate-500);
  display: block;
  margin-top: 2px;
}

.photo-browse-btn {
  pointer-events: auto;
  position: relative;
  z-index: 10;
  margin-top: 0.25rem;
}

.photo-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.photo-camera-btn {
  background: var(--primary-600) !important;
  color: #ffffff !important;
  border-color: var(--primary-600) !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  font-weight: 700;
}

.photo-camera-btn:hover {
  background: var(--primary-700) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.photo-gallery-btn {
  background: #ffffff !important;
  color: var(--slate-700) !important;
  border: 1px solid var(--slate-300) !important;
  font-weight: 600;
}

.photo-gallery-btn:hover {
  background: var(--slate-100) !important;
  border-color: var(--slate-400) !important;
}

/* Photo Processing Loading Animation */
.photo-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.75rem 1rem;
  position: relative;
  z-index: 10;
}

.photo-loading-spinner-ring {
  width: 56px;
  height: 56px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pls-ring-spin {
  position: absolute;
  inset: 0;
  border: 3.5px solid rgba(79, 70, 229, 0.15);
  border-top-color: var(--primary-600);
  border-right-color: #38bdf8;
  border-radius: 50%;
  animation: photoSpin 0.85s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.pls-icon {
  color: var(--primary-600);
  animation: photoPulse 1.4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-loading-title {
  font-weight: 800;
  color: var(--slate-900);
  font-size: 0.98rem;
  line-height: 1.2;
}

.photo-loading-subtitle {
  font-size: 0.76rem;
  color: var(--slate-500);
  margin-top: 0.2rem;
}

/* ==========================================
   Global Form Submitting Loading Animation Overlay
   ========================================== */
.form-submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.form-submit-overlay.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.form-submit-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl, 16px);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 390px;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(226, 232, 240, 0.85);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-submit-overlay.is-active .form-submit-dialog {
  transform: scale(1) translateY(0);
}

.form-submit-spinner-box {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.25rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fso-ring-spin {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(79, 70, 229, 0.15);
  border-top-color: var(--primary-600);
  border-right-color: #38bdf8;
  border-radius: 50%;
  animation: photoSpin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.fso-pulse-glow {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--primary-50);
  animation: photoPulse 1.8s ease-in-out infinite;
}

.fso-center-icon {
  position: relative;
  z-index: 2;
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-submit-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.form-submit-desc {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-bottom: 1.4rem;
  line-height: 1.45;
}

.form-submit-track {
  width: 100%;
  height: 6px;
  background: var(--slate-100);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.form-submit-bar {
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, var(--primary-500), #38bdf8, var(--primary-600));
  border-radius: 9999px;
  position: absolute;
  animation: fsoIndeterminate 1.5s ease-in-out infinite;
}

@keyframes fsoIndeterminate {
  0% { left: -45%; width: 35%; }
  50% { left: 30%; width: 55%; }
  100% { left: 105%; width: 35%; }
}

@keyframes photoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes photoPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}

.btn.is-submitting {
  pointer-events: none;
  opacity: 0.85;
}

.btn-spinner-icon {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: photoSpin 0.75s linear infinite;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.photo-preview-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.photo-upload-zone.has-preview {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  cursor: default !important;
}

.photo-preview-card,
.current-photo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg, 12px);
  padding: 0.85rem 1.15rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
  width: 100%;
  transition: all var(--transition-fast);
}

.photo-preview-card:hover,
.current-photo-card:hover {
  border-color: var(--slate-300);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.photo-preview-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.photo-preview-img-box {
  width: 76px;
  height: 54px;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--slate-100);
  border: 1.5px solid var(--slate-200);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.photo-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.photo-preview-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 34px;
  line-height: 1;
  padding: 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  vertical-align: middle;
  transition: all var(--transition-fast);
}

.photo-preview-actions .btn svg,
.photo-preview-actions .btn i {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

.photo-change-btn {
  background: #ffffff !important;
  color: var(--slate-700) !important;
  border: 1px solid var(--slate-300) !important;
}

.photo-change-btn:hover {
  background: var(--slate-100) !important;
  border-color: var(--slate-400) !important;
  color: var(--slate-900) !important;
  transform: translateY(-1px);
}

.photo-retake-btn {
  background: var(--primary-50) !important;
  color: var(--primary-700) !important;
  border: 1px solid var(--primary-200) !important;
}

.photo-retake-btn:hover {
  background: var(--primary-100) !important;
  color: var(--primary-900) !important;
  border-color: var(--primary-300) !important;
  transform: translateY(-1px);
}

.photo-remove-btn {
  color: #ef4444 !important;
  border: 1px solid #fee2e2 !important;
  background: #fff5f5 !important;
}

.photo-remove-btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  transform: translateY(-1px);
}

.check-photo-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
  text-decoration: none;
  transition: all var(--transition-fast);
  margin-left: 0.35rem;
  vertical-align: middle;
}

.check-photo-pill-badge:hover {
  background: var(--primary-100);
  color: var(--primary-900);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

/* ==========================================
   Check List Photo Thumbnail Frame
   ========================================== */
.col-photo {
  width: 64px;
  min-width: 64px;
  text-align: center;
  vertical-align: middle;
}

.check-thumb-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 52px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--slate-200);
  background: var(--slate-100);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  outline: none;
  flex-shrink: 0;
}

.check-thumb-frame:hover {
  border-color: var(--primary-500);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.check-thumb-frame:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-400);
}

.check-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.check-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.check-thumb-frame:hover .check-thumb-overlay {
  opacity: 1;
}

.check-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 52px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--slate-300);
  background: var(--slate-50);
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 500;
  user-select: none;
}

/* ==========================================
   Check Photo View Modal (Desktop & Mobile)
   ========================================== */
.check-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.check-photo-modal.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.check-photo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.check-photo-dialog {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: var(--radius-xl, 14px);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.check-photo-modal.is-open .check-photo-dialog {
  transform: scale(1) translateY(0);
}

.cpm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-200);
  background: #ffffff;
  flex-shrink: 0;
  gap: 0.75rem;
}

.cpm-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.cpm-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cpm-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpm-subtitle {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.cpm-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cpm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.cpm-close-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
  outline: none;
}

.cpm-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  transform: scale(1.08);
}

.cpm-body {
  flex: 1;
  overflow: auto;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 64vh;
  padding: 1.25rem;
  position: relative;
}

.cpm-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cpm-image {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #1e293b;
  user-select: none;
  transition: opacity 0.2s ease;
}

.cpm-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  text-align: center;
}

.cpm-spinner-ring {
  width: 52px;
  height: 52px;
  border: 3.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary-400);
  border-right-color: #38bdf8;
  border-radius: 50%;
  animation: photoSpin 0.85s linear infinite;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.28);
}

.cpm-loading-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.cpm-meta-grid {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cpm-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cpm-meta-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

.cpm-meta-value {
  font-size: 0.86rem;
}

.cpm-footer-actions {
  margin-left: auto;
}

/* ==========================================
   Mobile Bottom App Bar Navigation
   ========================================== */
.mobile-bottom-appbar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (min-width: 769px) {
  .mobile-bottom-appbar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-appbar {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 62px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 85;
    padding: 0 0.25rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: center;
    justify-content: space-around;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    height: 100%;
    color: var(--slate-400);
    text-decoration: none;
    transition: all 0.18s ease;
    padding: 0.3rem 0.1rem;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transition: transform 0.18s ease, color 0.18s ease;
  }

  .mobile-nav-icon svg,
  .mobile-nav-icon i {
    width: 20px;
    height: 20px;
    stroke-width: 2.1px;
  }

  .mobile-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    margin-top: 2px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item:active {
    color: var(--slate-700);
  }

  .mobile-nav-item.active {
    color: var(--primary-600);
  }

  .mobile-nav-item.active .mobile-nav-icon {
    transform: translateY(-1px);
    color: var(--primary-600);
  }

  .mobile-nav-item.active .mobile-nav-label {
    font-weight: 800;
    color: var(--primary-700);
  }

  /* Center "Add Check" Elevated Button */
  .mobile-nav-item-action {
    position: relative;
    top: -12px;
    flex: 1.15;
  }

  .mobile-nav-action-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--indigo-600));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    border: 3px solid #ffffff;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-nav-action-btn svg,
  .mobile-nav-action-btn i {
    width: 24px;
    height: 24px;
    stroke-width: 2.6px;
    color: #ffffff;
  }

  .mobile-nav-item-action:active .mobile-nav-action-btn {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  }

  .mobile-nav-item-action .mobile-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 3px;
    color: var(--primary-700);
  }

  .mobile-nav-item-action.active .mobile-nav-action-btn {
    background: linear-gradient(135deg, var(--indigo-700), var(--primary-700));
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.55);
  }

  /* Content Padding for Bottom App Bar clearance */
  .main-wrapper {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .app-footer {
    padding: 1rem 1rem !important;
  }
}

/* ==========================================
   Mobile-Specific Responsiveness (< 768px & < 640px)
   ========================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .app-container {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Dashboard Alert Badges Mobile Layout */
  .dashboard-alert-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1rem !important;
    gap: 0.85rem !important;
  }

  .dashboard-alert-badges {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .alert-badge-item {
    min-width: unset !important;
    width: 100% !important;
    padding: 0.55rem 0.65rem !important;
  }

  /* Table Responsiveness: Zero Horizontal Scroll Card System */
  .mobile-table-scroll-hint {
    display: none !important;
  }

  .table-responsive {
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
    min-height: auto !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
  }

  .table-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  /* Transform standard tables into stacked responsive cards */
  .table:not(.key-value-table) {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .table:not(.key-value-table) thead {
    display: none !important;
  }

  .table:not(.key-value-table) tbody {
    display: block !important;
    width: 100% !important;
  }

  /* Reset all desktop column widths to fit 100% width cleanly */
  .table:not(.key-value-table) th,
  .table:not(.key-value-table) td,
  .col-sn,
  .col-id,
  .col-client,
  .col-name,
  .col-number,
  .col-amount,
  .col-date,
  .col-notes,
  .col-status,
  .col-actions,
  .col-share {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* Each table row becomes an independent card with distinct separator */
  .table:not(.key-value-table) tbody tr {
    display: block !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid var(--slate-200) !important;
    border-bottom: 3.5px solid #94a3b8 !important; /* Thick prominent separator between rows */
    border-radius: var(--radius-lg) !important;
    padding: 0.85rem 1rem !important;
    margin-bottom: 0.95rem !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
    box-sizing: border-box !important;
    transition: all var(--transition-fast) !important;
    position: relative !important;
  }

  .table:not(.key-value-table) tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
  }

  .table:not(.key-value-table) tbody tr:hover,
  .table:not(.key-value-table) tbody tr:active {
    border-color: var(--primary-300) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.09) !important;
  }

  /* Each cell becomes a line item row inside the card */
  .table:not(.key-value-table) td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid var(--slate-100) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    font-size: 0.84rem !important;
    text-align: right !important;
    width: 100% !important;
    background: transparent !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
  }

  /* Render data-label on the left */
  .table:not(.key-value-table) td[data-label]::before {
    content: attr(data-label) !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    color: var(--slate-500) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    text-align: left !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
  }

  /* S.N. badge row styling */
  .table:not(.key-value-table) td.col-sn {
    font-size: 0.75rem !important;
    padding-top: 0.15rem !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 1px dashed var(--slate-200) !important;
    color: var(--slate-400) !important;
  }

  /* Client & Bank Cell */
  .table:not(.key-value-table) td.col-client {
    border-bottom: 1.5px solid var(--slate-200) !important;
    padding-bottom: 0.65rem !important;
    margin-bottom: 0.25rem !important;
  }

  .table:not(.key-value-table) td.col-client .client-cell {
    width: auto !important;
    justify-content: flex-end !important;
    text-align: right !important;
  }

  /* Notes Cell */
  .table:not(.key-value-table) td.col-notes {
    align-items: flex-start !important;
  }

  .table:not(.key-value-table) td.col-notes > div {
    max-width: 65% !important;
    text-align: right !important;
    word-break: break-word !important;
  }

  /* Share column in reports */
  .table:not(.key-value-table) td.col-share {
    width: 100% !important;
  }

  .table:not(.key-value-table) td.col-share .flex {
    width: 60% !important;
    justify-content: flex-end !important;
  }

  /* Action Buttons at bottom of card */
  .table:not(.key-value-table) td.col-actions,
  .table:not(.key-value-table) td:last-child {
    border-top: 1.5px solid var(--slate-200) !important;
    border-bottom: none !important;
    padding-top: 0.7rem !important;
    margin-top: 0.4rem !important;
    justify-content: flex-end !important;
    width: 100% !important;
  }

  .table:not(.key-value-table) td.col-actions::before,
  .table:not(.key-value-table) td:last-child::before {
    margin-right: auto !important;
  }

  /* Empty state / Colspan */
  .table:not(.key-value-table) tbody tr td[colspan] {
    display: block !important;
    text-align: center !important;
    border-bottom: none !important;
    padding: 2.5rem 1rem !important;
    color: var(--slate-500) !important;
  }

  .table:not(.key-value-table) tbody tr td[colspan]::before {
    display: none !important;
  }

  /* Key-Value metadata tables (e.g. checks/view.php) */
  .key-value-table {
    width: 100% !important;
    min-width: 0 !important;
  }

  .key-value-table tbody tr {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.65rem 0.25rem !important;
    border-bottom: 1.5px solid var(--slate-200) !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .key-value-table td {
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .key-value-table td:last-child {
    text-align: right !important;
    word-break: break-word !important;
  }

  /* Dashboard Switch & Mobile Check Card Separator */
  .desktop-table {
    display: none !important;
  }

  .mobile-check-list {
    display: block !important;
    width: 100% !important;
  }

  .mobile-check-card {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.1rem 1.2rem !important;
    background: #ffffff !important;
    border: 1px solid var(--slate-200) !important;
    border-bottom: 3.5px solid #94a3b8 !important; /* Thick prominent separator */
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0.85rem !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
  }

  .mobile-check-card:nth-child(even) {
    background: #f8fafc !important;
  }

  .mobile-check-card:last-child {
    border-bottom: 3.5px solid #94a3b8 !important;
  }

  .mobile-check-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
  }

  .mobile-check-field {
    min-width: 0 !important;
  }

  .mobile-check-field span {
    word-break: break-word !important;
  }

  /* Enhanced Table Pagination on mobile */
  .table-pagination {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    padding: 1rem 0.85rem !important;
    background: #ffffff !important;
    border: 1px solid var(--slate-200) !important;
    border-radius: var(--radius-lg) !important;
    margin-top: 0.75rem !important;
  }

  .pagination-left,
  .pagination-right {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .pagination-controls {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.35rem !important;
  }

  .pagination-info {
    font-size: 0.78rem !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 0.25rem !important;
  }

  /* Responsive Monthly Modal Dialog */
  .monthly-modal-dialog {
    width: 96% !important;
    max-width: 100% !important;
    margin: 1rem auto !important;
    border-radius: var(--radius-lg) !important;
    max-height: 85vh !important;
  }

  /* Client management search form on mobile */
  .table-card form[action=""] {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .table-card form[action=""] input,
  .table-card form[action=""] select,
  .table-card form[action=""] .btn {
    width: 100% !important;
  }

  /* Check Photo column & modal mobile responsiveness */
  .col-photo {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .table:not(.key-value-table) td.col-photo {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .table:not(.key-value-table) td.col-photo .check-thumb-frame {
    width: 58px !important;
    height: 42px !important;
  }

  .check-photo-dialog {
    max-height: 94vh !important;
    margin: 0 !important;
    border-radius: var(--radius-lg) !important;
  }

  .cpm-header {
    padding: 0.75rem 1rem !important;
  }

  .cpm-action-btn .cpm-btn-text {
    display: none !important;
  }

  .cpm-body {
    padding: 0.6rem !important;
    max-height: 52vh !important;
    min-height: 220px !important;
  }

  .cpm-image {
    max-height: 48vh !important;
  }

  .cpm-footer {
    padding: 0.75rem 1rem !important;
  }

  .cpm-meta-grid {
    gap: 0.65rem 1rem !important;
  }

  /* Photo Preview Card & Actions Mobile Alignment */
  .photo-preview-card,
  .current-photo-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    padding: 0.85rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .photo-preview-left {
    width: 100% !important;
    gap: 0.85rem !important;
  }

  .photo-preview-img-box {
    width: 68px !important;
    height: 52px !important;
  }

  .photo-preview-actions {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .photo-preview-actions .photo-change-btn {
    flex: 1 1 auto !important;
  }

  .photo-preview-actions .photo-retake-btn {
    flex: 1 1 auto !important;
  }

  .photo-preview-actions .photo-remove-btn {
    flex: 0 0 auto !important;
  }

  .photo-preview-actions .btn {
    height: 38px !important;
    padding: 0 0.85rem !important;
    font-size: 0.8rem !important;
    justify-content: center !important;
  }

  .photo-action-buttons {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .photo-action-buttons .btn {
    width: 100% !important;
    height: 40px !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
  }
}