/* ==========================================
   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.75rem 0.9rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--slate-200);
}

.table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
  line-height: 1.35;
  transition: var(--transition-fast);
}

.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);
}

/* Tablet & Mobile Screens (< 1024px) */
@media (max-width: 1023px) {
  .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 1.25rem;
  }

  .content-body {
    padding: 1.25rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 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: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

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

  .filter-btns-group {
    flex-wrap: wrap;
    width: 100%;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

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

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

  /* 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;
  }
}

/* ==========================================
   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: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

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

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

.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: 639px) {
  .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: 5rem;
  }
}