/* ==========================================================================
   NEXT-LEVEL EXECUTIVE UI THEME — LOAN & LEDGER SYSTEM
   Inspired by High-End Dribbble Modern Aesthetics ("Nurein" Style)
   100% Light Mode | Pure Teal/Mint Elegance | Responsive Bento Architecture
   ========================================================================== */

:root {
  /* Canvas & Card Surfaces */
  --bg-canvas: #f2f5f8;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-hover: #eef2f6;

  /* Reference Signature Dark Teal Card Gradient */
  --teal-card-bg: linear-gradient(150deg, #0b6068 0%, #063d43 100%);
  --teal-card-border: rgba(255, 255, 255, 0.15);

  /* Primary Palette (Deep Teal, Vibrant Mint, Aquamarine) */
  --teal-900: #042f2e;
  --teal-800: #07474a;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;

  /* Typography Colors */
  --text-title: #0f1f2c;
  --text-body: #334e68;
  --text-muted: #627d98;
  --text-subtle: #9fb3c8;

  /* Functional Indicators */
  --color-disbursement: #0284c7; /* Vibrant Blue */
  --color-disbursement-bg: #e0f2fe;
  --color-recovery: #0d9488;     /* Signature Teal */
  --color-recovery-bg: #e6fffa;
  --color-danger: #e11d48;       /* Rose */
  --color-danger-bg: #ffe4e6;
  --color-amber: #d97706;        /* Amber */
  --color-amber-bg: #fef3c7;

  /* Borders & Shadows */
  --border-subtle: #e2e8f0;
  --border-card: #eaedf2;
  --shadow-bento: 0 10px 25px -5px rgba(15, 31, 44, 0.04), 0 4px 10px -2px rgba(15, 31, 44, 0.02);
  --shadow-hover: 0 20px 35px -8px rgba(13, 148, 136, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.04);
  --shadow-teal-glow: 0 8px 24px -4px rgba(13, 148, 136, 0.28);

  /* Modern Curved Radius Tokens */
  --radius-pill: 9999px;
  --radius-card: 24px;
  --radius-inner: 16px;
  --radius-sm: 10px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------------------------
   BASE & RESET
   ---------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-title);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* Master Container - Hidden by default until authenticated */
.app-container {
  display: none;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .app-container {
    padding: 1rem 1rem 5.5rem 1rem;
  }
}

/* ----------------------------------------------------
   TOP EXECUTIVE NAVBAR (Matching Reference)
   ---------------------------------------------------- */
.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-bento);
  margin-bottom: 2rem;
  gap: 1.5rem;
}

/* Logo */
.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-dot-matrix {
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-title);
}

.brand-title span {
  color: var(--teal-600);
}

/* Navbar Nav Links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--teal-700);
  background-color: var(--teal-50);
}

.nav-link.active {
  color: #ffffff;
  background-color: var(--teal-700);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

/* Top Navbar Profile & Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.3);
}

.user-meta-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.1;
}

.user-meta-role {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-weight: 500;
}

/* ----------------------------------------------------
   HERO GREETING & MICRO STATS WIDGETS (Reference Header)
   ---------------------------------------------------- */
.hero-greeting-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-text-block {
  display: flex;
  flex-direction: column;
}

.hero-main-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-title);
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.35rem;
}

/* Micro Stat Widgets Row */
.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.micro-stat-widget {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem 0.5rem 0.65rem;
  box-shadow: 0 4px 15px rgba(15, 31, 44, 0.03);
  transition: var(--transition);
}

.micro-stat-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.1);
  border-color: #99f6e4;
}

.micro-stat-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0fdfa;
  color: #0d9488;
  flex-shrink: 0;
}

.micro-stat-icon-circle.drop-blue {
  background-color: #f0f9ff;
  color: #0284c7;
}

.micro-stat-icon-circle.vr-purple {
  background-color: #f5f3ff;
  color: #7c3aed;
}

.micro-stat-content {
  display: flex;
  flex-direction: column;
}

.micro-stat-val {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.micro-stat-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

/* ----------------------------------------------------
   BENTO GRID ARCHITECTURE (Dashboard Page)
   ---------------------------------------------------- */
.bento-grid-top {
  display: grid;
  grid-template-columns: 1.15fr 2fr 1.25fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.bento-grid-bottom {
  display: grid;
  grid-template-columns: 1.15fr 2fr 1.25fr;
  gap: 1.5rem;
  align-items: start;
}

.bento-grid-bottom > .bento-card {
  height: auto;
  align-self: start;
}

@media (max-width: 1200px) {
  .bento-grid-top,
  .bento-grid-bottom {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .bento-grid-top,
  .bento-grid-bottom {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------
   CARD STYLES (Pure Floating White & Signature Gradient)
   ---------------------------------------------------- */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-bento);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: var(--transition);
}

.bento-card:hover {
  box-shadow: var(--shadow-hover);
}

.card-header-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-title-icon {
  color: var(--teal-600);
  display: flex;
}

.card-title-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.01em;
}

.card-action-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-600);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.card-action-link:hover {
  color: var(--teal-800);
}

/* ----------------------------------------------------
   CARD 1: APPOINTMENT (Exact Pixel-to-Pixel Replica)
   ---------------------------------------------------- */
.card-appointment {
  background: #ffffff;
  border-radius: 28px;
  padding: 1.65rem 1.65rem 1.4rem 1.65rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
}

.card-title-text-exact {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.card-title-icon-teal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-action-link-teal {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #14b8a6;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.card-action-link-teal:hover {
  color: #0d9488;
}

/* Calendar Days Strip */
.calendar-days-bar-exact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding: 0 0.25rem;
}

.cal-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
}

.cal-col .cal-day-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
}

.cal-col .cal-date-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #94a3b8;
  transition: var(--transition);
}

.cal-col:hover .cal-date-label {
  color: #334155;
}

.cal-col.active .cal-day-label {
  color: #334155;
  font-weight: 600;
}

.cal-col.active .cal-date-label {
  color: #0f172a;
  font-weight: 800;
  font-size: 1.25rem;
  transform: scale(1.05);
}

/* Vertical Timeline Stream with Stem */
.timeline-vertical-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.timeline-vertical-stem {
  position: absolute;
  left: 24px;
  top: 14px;
  bottom: 22px;
  width: 1.5px;
  background: #e2e8f0;
  z-index: 1;
}

.timeline-stem-end-chevron {
  position: absolute;
  left: 19px;
  bottom: 2px;
  z-index: 1;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.timeline-pill-badge {
  flex-shrink: 0;
  width: 50px;
  height: 26px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #42b2a6 0%, #2ba598 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(45, 165, 152, 0.25);
  letter-spacing: -0.01em;
}

.timeline-event-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 16px;
  padding: 0.75rem 1rem;
  border: 1px solid #edf2f7;
  transition: var(--transition);
}

.timeline-event-box:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.event-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.event-main-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.event-super-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
}

.event-sub-title {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 500;
}

.event-avatars-cluster {
  display: flex;
  align-items: center;
}

.av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  margin-left: -8px;
  background-size: cover;
  background-position: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #0f766e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  background-color: #ccfbf1;
}

.av:first-child {
  margin-left: 0;
}

.av1 {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
}

.av2 {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
}

.av3 {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
}

.av4 {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
}

.av-arrow {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-left: 0.45rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.av-arrow:hover {
  color: #0d9488;
}

/* ----------------------------------------------------
   CARD 2: HEALTH PROGRESS SCORE (Exact Pixel-to-Pixel Replica)
   ---------------------------------------------------- */
.card-health-score {
  background: #ffffff;
  border-radius: 28px;
  padding: 1.65rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
}

.info-circle-btn {
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-circle-btn:hover {
  opacity: 1;
}

.health-score-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.health-percentage-block {
  display: flex;
  flex-direction: column;
}

.health-big-pct {
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.health-since-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.mini-toggle-pill {
  width: 26px;
  height: 14px;
  background: #ccfbf1;
  border-radius: 9999px;
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.mini-toggle-pill .dot {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0d9488;
}

/* Floating Dual Vitals Card */
.floating-vitals-card {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 20px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
}

.vital-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.vital-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.vital-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.15;
}

.vital-lbl {
  font-size: 0.66rem;
  color: #94a3b8;
  font-weight: 500;
}

.vital-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
}

.vital-add-round-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #ccfbf1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.vital-add-round-btn:hover {
  background: #f0fdfa;
  border-color: #0d9488;
  transform: scale(1.05);
}

/* Bottom Progress Visualization Container */
.progress-visualization-container {
  margin-top: auto;
  padding-top: 1rem;
}

.progress-markers-row {
  position: relative;
  width: 100%;
  height: 24px;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.progress-markers-row .marker-item {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.progress-markers-row .marker-item.m10 { left: 10%; }
.progress-markers-row .marker-item.m25 { left: 25%; }
.progress-markers-row .marker-item.m50 { left: 50%; }

.progress-markers-row .m-dot {
  color: #0d9488;
  font-size: 1.1rem;
}

.progress-markers-row .marker-target {
  position: absolute;
  top: 0;
  color: #0d9488;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transform: translateX(-50%);
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  background: #f0fdfa;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid #ccfbf1;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.12);
}

.progress-markers-row .m-dot-target {
  font-size: 1.1rem;
  color: #0d9488;
}

/* The Segmented Visual Track */
.exact-progress-track {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 48px;
  width: 100%;
}

.track-pillar {
  width: 5px;
  background: #2ba598;
  border-radius: 9999px;
  flex-shrink: 0;
}

.track-block-med {
  width: 14px;
  background: #2ba598;
  border-radius: 9999px;
  flex-shrink: 0;
}

.track-block-wide {
  width: 32px;
  background: #2ba598;
  border-radius: 9999px;
  flex-shrink: 0;
}

.track-block-solid {
  flex: 1;
  max-width: 50%;
  background: linear-gradient(180deg, #32b5a7 0%, #1a887b 100%);
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.target-indicator-slit {
  width: 2px;
  height: 75%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
}

.track-block-hatched {
  width: 25%;
  border-radius: 12px;
  background: repeating-linear-gradient(-45deg, #f1f5f9, #f1f5f9 4px, #e2e8f0 4px, #e2e8f0 8px);
}

/* ----------------------------------------------------
   CARD 3: TREATMENT PLAN (Signature Teal Gradient Replica)
   ---------------------------------------------------- */
.bento-card-teal-exact {
  background: linear-gradient(168deg, #18888e 0%, #0d5e63 55%, #084347 100%);
  border-radius: 28px;
  padding: 1.65rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 36px -6px rgba(13, 94, 99, 0.35);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 390px;
}

.teal-exact-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.teal-exact-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.teal-exact-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem 0;
}

.teal-exact-huge-num {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.teal-exact-title-stack {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.25;
}

.teal-exact-frequency-stack {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
  line-height: 1.25;
}

.teal-exact-frequency-stack .freq-sub {
  color: rgba(255, 255, 255, 0.6);
}

.teal-exact-wave-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 95px;
  padding: 0.5rem 0;
  margin-top: 1rem;
}

.wave-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 6px;
}

.wave-bar.active-white {
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.85);
}

.teal-exact-timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  padding: 0 4px;
  margin-top: 0.5rem;
}

/* ----------------------------------------------------
   CARD 4: REPORT & CASHFLOW CHART (Reference Bottom Center)
   ---------------------------------------------------- */
.report-card-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.report-tab-btn {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: var(--transition);
}

.report-tab-btn:hover {
  color: var(--teal-700);
}

.report-tab-btn.active {
  background: var(--teal-700);
  color: #ffffff;
}

/* Card 4 & 5 Shared Equal Heights */
.card-borrower-profile,
.card-cashflow-report {
  min-height: 410px;
  height: 410px;
  display: flex;
  flex-direction: column;
}

.card-cashflow-report .chart-canvas-container {
  flex: 1;
  height: 100%;
  width: 100%;
  position: relative;
}

/* ----------------------------------------------------
   CARD 4: EXECUTIVE SMART CREDIT CARD & DOSSIER
   ---------------------------------------------------- */
.card-borrower-profile {
  display: flex;
  flex-direction: column;
}

.dossier-select-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dossier-select-pill {
  appearance: none;
  -webkit-appearance: none;
  background: #f0fdfa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") right 0.75rem center / 11px no-repeat;
  border: 1.5px solid #99f6e4;
  border-radius: 9999px;
  padding: 0.35rem 2rem 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: #0f766e;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.08);
}

.dossier-select-pill:hover {
  border-color: #0d9488;
  background-color: #e6fffa;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.16);
}

.dossier-select-pill option {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  padding: 0.4rem;
}

.borrower-dossier-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

/* Executive Obsidian & Emerald Smart Credit Card */
.smart-credit-card {
  position: relative;
  min-height: 170px;
  border-radius: 18px;
  padding: 1.2rem 1.35rem;
  background: linear-gradient(135deg, #052e25 0%, #064e3b 45%, #0f766e 85%, #0d9488 100%);
  border: 1px solid rgba(110, 231, 183, 0.35);
  box-shadow: 0 12px 28px -6px rgba(6, 78, 59, 0.45), 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.smart-credit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(6, 78, 59, 0.55), 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: rgba(167, 243, 208, 0.6);
}

.smart-card-shimmer {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: radial-gradient(circle at 75% 25%, rgba(45, 212, 191, 0.25), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.15), transparent 45%);
  pointer-events: none;
}

.smart-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.smart-card-chip-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.gold-emv-chip {
  width: 32px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  position: relative;
  border: 0.8px solid #b45309;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.gold-emv-chip .chip-line {
  position: absolute;
  background: #b45309;
  opacity: 0.45;
}

.gold-emv-chip .chip-line.horizontal.top {
  top: 7px;
  left: 0;
  right: 0;
  height: 0.8px;
}

.gold-emv-chip .chip-line.horizontal.bottom {
  bottom: 7px;
  left: 0;
  right: 0;
  height: 0.8px;
}

.gold-emv-chip .chip-line.vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0.8px;
  transform: translateX(-50%);
}

.smart-card-nfc {
  display: flex;
  align-items: center;
  opacity: 0.85;
}

.smart-card-badge-vip {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ecfdf5;
  border: 1px solid rgba(167, 243, 208, 0.35);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}

.smart-card-mid-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  z-index: 2;
  margin: 0.5rem 0;
}

.smart-card-avatar-monogram {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #ccfbf1 100%);
  color: #064e3b;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.smart-card-name-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.smart-card-borrower-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-card-borrower-son {
  font-size: 0.8rem;
  color: #a7f3d0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smart-card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 0.75rem;
}

.smart-card-bal-group {
  display: flex;
  flex-direction: column;
}

.smart-card-bal-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: #99f6e4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.smart-card-bal-amount {
  font-size: 1.25rem;
  font-weight: 850;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.smart-card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.status-pulse-circle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 2s infinite;
}

.smart-card-status-badge.cleared-badge {
  background: rgba(16, 185, 129, 0.25);
  border-color: #6ee7b7;
  color: #d1fae5;
}

.smart-card-status-badge.cleared-badge .status-pulse-circle {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Bento Specification Matrix Grid */
.dossier-specs-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.spec-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.spec-tile:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.spec-tile.highlight-teal {
  background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
  border-color: #99f6e4;
}

.spec-tile-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spec-tile-icon.teal {
  background: #ccfbf1;
  color: #0d9488;
}

.spec-tile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.spec-tile-lbl {
  font-size: 0.62rem;
  font-weight: 750;
  color: #64748b;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.spec-tile-val {
  font-size: 0.82rem;
  font-weight: 750;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spec-tile-val.font-mono {
  font-family: monospace;
  font-size: 0.8rem;
  letter-spacing: -0.01em;
}

.spec-tile-val.text-teal {
  color: #0f766e;
}

/* Dossier Action Buttons */
.dossier-actions-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.btn-dossier-action {
  flex: 1;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-dossier-edit {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-dossier-edit:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-dossier-stmt {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-dossier-stmt:hover {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
  transform: translateY(-1px);
}

.btn-dossier-pay {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-dossier-pay:hover {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.42);
}
  color: var(--text-title);
}

/* ----------------------------------------------------
   CARD 6: PAYMENT CHANNELS & DISTRIBUTION (Next-Level Executive)
   ---------------------------------------------------- */
.card-channels-premium {
  display: flex;
  flex-direction: column;
  height: auto;
  align-self: start;
}

.card-header-channels {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.channels-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.card-header-channels .card-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.card-header-channels .card-title-text-exact {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  letter-spacing: -0.02em;
  margin: 0;
}

.card-header-channels .card-subtitle-small {
  font-size: 0.74rem;
  color: #64748b;
  margin-left: 26px;
  white-space: nowrap;
}

.channels-filter-pills {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: 0.15rem;
  border-radius: var(--radius-pill);
  gap: 0.1rem;
  flex-shrink: 0;
}

.channel-filter-btn {
  border: none;
  background: transparent;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.channel-filter-btn:hover {
  color: #0f766e;
}

.channel-filter-btn.active {
  background: #ffffff;
  color: #0d9488;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.channels-donut-wrap {
  position: relative;
  height: 185px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.15rem 0 0.25rem 0;
}

.channels-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  width: 95px;
}

.center-hub-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: all 0.2s ease;
}

.center-hub-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
  transition: all 0.2s ease;
}

/* Channels Toggle Button */
.channels-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.btn-toggle-channels {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.06);
}

.btn-toggle-channels:hover {
  background: #ccfbf1;
  color: #042f2e;
  border-color: #99f6e4;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.12);
}

.btn-toggle-channels svg {
  transition: transform 0.25s ease;
}

.btn-toggle-channels.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

.btn-toggle-channels.active svg {
  transform: rotate(180deg);
  stroke: #ffffff;
}

/* Rich Channel Bento List */
.channels-bento-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
  animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-bento-row {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  transition: var(--transition);
  cursor: pointer;
}

.channel-bento-row:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 31, 44, 0.04);
}

.channel-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

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

.channel-icon-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-icon-avatar svg {
  width: 13px;
  height: 13px;
}

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

.channel-name-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.15;
}

.channel-tx-count {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}

.channel-row-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: right;
}

.channel-amount-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
}

.channel-pct-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
}

.channel-progress-track {
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.channel-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------------------------
   DATA ENTRY & CRUD TABLE PAGE
   ---------------------------------------------------- */
.crud-page-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-bento);
}

.crud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-field-pill {
  position: relative;
  min-width: 280px;
  flex: 1;
}

.search-field-pill input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  font-size: 0.88rem;
  color: var(--text-title);
  outline: none;
  transition: var(--transition);
}

.search-field-pill input:focus {
  background: #ffffff;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.search-field-pill .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.select-pill {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-pill:focus {
  border-color: var(--teal-500);
  background: #ffffff;
}

/* Modern Rounded Data Table */
.data-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-inner);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.styled-table th {
  background-color: var(--bg-card-subtle);
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.styled-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: middle;
}

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

.styled-table tbody tr:hover {
  background-color: var(--teal-50);
}

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

/* Status & Type Badges */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-disb {
  background-color: var(--color-disbursement-bg);
  color: var(--color-disbursement);
}

.badge-repay {
  background-color: var(--color-recovery-bg);
  color: var(--color-recovery);
}

/* Action Icon Buttons */
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-body);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--teal-50);
  color: var(--teal-700);
  border-color: var(--teal-500);
}

.action-btn.delete:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* ----------------------------------------------------
   BUTTONS (Pill Aesthetic)
   ---------------------------------------------------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-teal {
  background-color: var(--teal-700);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

.btn-teal:hover {
  background-color: var(--teal-800);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.38);
}

.btn-white {
  background-color: #ffffff;
  color: var(--text-title);
  border-color: var(--border-subtle);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.btn-white:hover {
  background-color: var(--bg-card-subtle);
  border-color: var(--teal-400);
}

.btn-danger-pill {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

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

/* ----------------------------------------------------
   CUSTOMER STATEMENT VIEW (Bank-Grade Official)
   ---------------------------------------------------- */
.statement-wrapper-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 2.5rem;
  box-shadow: var(--shadow-bento);
  border: 1px solid var(--border-card);
}

.statement-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--text-title);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.statement-kpi-4grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.stmt-metric-box {
  background: var(--bg-card-subtle);
  border-radius: var(--radius-inner);
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.stmt-metric-box.alert-red {
  background: #fff1f2;
  border-color: #fecdd3;
}

.stmt-metric-box.cleared-green {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.stmt-metric-val {
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

/* ----------------------------------------------------
   MODALS (Smooth Glassmorphic Dialogs)
   ---------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 31, 44, 0.45);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-window {
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: 0 25px 50px -12px rgba(15, 31, 44, 0.25);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-card);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.96) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.35rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-title);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.modal-footer {
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-card-subtle);
}

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

.form-label-clean {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
}

.form-input-clean {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-subtle);
  font-size: 0.88rem;
  color: var(--text-title);
  outline: none;
  transition: var(--transition);
}

.form-input-clean:focus {
  background: #ffffff;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* ----------------------------------------------------
   RECEIPT UPLOAD DROPZONE & WEBP COMPRESSION
   ---------------------------------------------------- */
.badge-optional-webp {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.receipt-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-inner);
  background: #f8fafc;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.receipt-dropzone:hover,
.receipt-dropzone.drag-over {
  border-color: #0d9488;
  background: #f0fdfa;
}

.dropzone-empty {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0;
}

.dropzone-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ccfbf1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0f766e;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.15);
}

.dropzone-text-group {
  display: flex;
  flex-direction: column;
}

.dropzone-title {
  font-size: 0.86rem;
  color: #1e293b;
}

.dropzone-title strong {
  color: #0f766e;
}

.dropzone-subtext {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.dropzone-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem 0;
}

.receipt-preview-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  background: #ffffff;
}

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

.thumb-overlay-hint {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 44, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.receipt-preview-thumb-wrap:hover .thumb-overlay-hint {
  opacity: 1;
}

.receipt-meta-block {
  flex: 1;
  min-width: 0;
}

.receipt-filename {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.receipt-compression-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.pill-orig {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.pill-webp {
  font-size: 0.7rem;
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
}

.receipt-btn-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-receipt-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: #475569;
}

.btn-receipt-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-receipt-icon.remove:hover {
  background: #ffe4e6;
  border-color: #fecdd3;
  color: #e11d48;
}

/* Table Pill Badge for Attached Receipts */
.btn-receipt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.25rem;
}

.btn-receipt-badge:hover {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

/* ----------------------------------------------------
   LIGHTBOX RECEIPT VIEWER MODAL
   ---------------------------------------------------- */
.receipt-viewer-window {
  max-width: 780px;
  width: 95%;
  height: 90vh;
  max-height: 820px;
  display: flex;
  flex-direction: column;
}

.modal-subtitle-chip {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.receipt-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-viewer-tool {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: #334155;
}

.btn-viewer-tool:hover {
  background: #f1f5f9;
  color: #0f766e;
  border-color: #cbd5e1;
}

.receipt-viewer-body {
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  gap: 0.85rem;
}

.receipt-detail-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-inner);
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #334155;
  flex-shrink: 0;
}

.detail-pill strong {
  color: #64748b;
  margin-right: 0.25rem;
}

.receipt-canvas-viewport {
  flex: 1;
  background: #0f172a;
  border-radius: var(--radius-inner);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  border: 1px solid #1e293b;
}

.receipt-full-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

/* ----------------------------------------------------
   MOBILE BOTTOM DOCK NAVIGATION
   ---------------------------------------------------- */
.mobile-dock-nav {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 200;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 0.2rem;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
}

.dock-item.active {
  color: var(--teal-700);
  background: var(--teal-50);
}

@media (max-width: 900px) {
  .top-navbar .navbar-nav {
    display: none;
  }
  .mobile-dock-nav {
    display: flex;
  }
}

/* ----------------------------------------------------
   PAGES TOGGLE & TRANSITION
   ---------------------------------------------------- */
.page-view {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.35rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-title);
  pointer-events: auto;
  animation: toastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastPop {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.success { border-left: 5px solid var(--teal-600); }
.toast.danger { border-left: 5px solid var(--color-danger); }
.toast.info { border-left: 5px solid #0284c7; }

/* ====================================================
   VIEW 3: EXECUTIVE CUSTOMER STATEMENT ARCHITECTURE
   ==================================================== */
.statement-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* Floating Statement Control Toolbar */
.statement-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.35rem;
  box-shadow: var(--shadow-bento);
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.statement-filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.stmt-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  transition: var(--transition);
}

.stmt-select-wrap:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.stmt-select-user-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.stmt-select-input {
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  padding-right: 0.5rem;
}

.stmt-date-input-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
}

.stmt-date-input {
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.stmt-preset-pills {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f1f5f9;
  padding: 0.2rem;
  border-radius: var(--radius-pill);
}

.stmt-pill-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition);
}

.stmt-pill-btn:hover {
  color: #0f766e;
}

.stmt-pill-btn.active {
  background: #ffffff;
  color: #0d9488;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Action Buttons */
.stmt-actions-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Master Statement Document Card (Floating Canvas with Luxury Border) */
.statement-doc-canvas {
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid var(--border-card);
  box-shadow: 0 16px 45px -10px rgba(15, 31, 44, 0.07);
  padding: 2.75rem 3rem;
  position: relative;
  overflow: hidden;
}

/* Subtle Watermark Seal in Background */
.statement-doc-canvas::before {
  content: 'LEDGERPRO FINANCIAL SYSTEM';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: rgba(13, 148, 136, 0.02);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

/* Header & Official Brand Band */
.statement-letterhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.statement-org-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.statement-org-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.25);
}

.statement-org-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.statement-org-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.15rem;
  font-weight: 500;
}

.statement-doc-meta {
  text-align: right;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.statement-badge-type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #0f766e;
  text-transform: uppercase;
  white-space: nowrap;
}

.stmt-meta-sep {
  color: #cbd5e1;
  font-size: 0.7rem;
  line-height: 1;
  user-select: none;
}

.statement-meta-pill {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Customer Profile Hero Bento Banner */
.statement-customer-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 1.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.customer-banner-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.customer-big-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
  border: 3px solid #ffffff;
  flex-shrink: 0;
}

.customer-info-stack {
  display: flex;
  flex-direction: column;
}

.customer-account-holder-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0d9488;
  letter-spacing: 0.08em;
}

.customer-primary-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.customer-son-of {
  font-size: 0.88rem;
  color: #475569;
  font-weight: 600;
  margin-top: 0.15rem;
}

.customer-location {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.customer-banner-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.customer-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.customer-status-chip.cleared {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.customer-status-chip.active {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.customer-status-chip.overdue {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.customer-meta-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: #475569;
}

.customer-meta-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.customer-timeline-row {
  margin-top: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.customer-meta-pill.timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border-color: #cbd5e1;
  font-size: 0.78rem;
}

.customer-meta-pill.tenure-pill {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

/* 4 Bento Glassmorphic Summary Cards */
.statement-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

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

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

.statement-kpi-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 20px;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 6px 18px rgba(15, 31, 44, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.statement-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(15, 31, 44, 0.06);
}

.statement-kpi-card.cleared-card {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
}

.statement-kpi-card.alert-card {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
}

.stmt-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stmt-kpi-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stmt-kpi-icon-wrap.slate {
  background: #f1f5f9;
  color: #475569;
}

.stmt-kpi-icon-wrap.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.stmt-kpi-icon-wrap.teal {
  background: #ccfbf1;
  color: #0d9488;
}

.stmt-kpi-icon-wrap.rose {
  background: #ffe4e6;
  color: #e11d48;
}

.stmt-kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
}

.stmt-kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stmt-kpi-subtext {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 0.35rem;
}

/* Luxury Statement Table */
.statement-table-wrap {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15, 31, 44, 0.02);
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

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

.stmt-table th {
  background: #0f1f2c;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border: none;
}

.stmt-table td {
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  vertical-align: middle;
}

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

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

.stmt-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
}

.stmt-badge-pill.debit {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.stmt-badge-pill.credit {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.stmt-badge-pill.running {
  font-weight: 800;
  font-size: 0.92rem;
}

.stmt-badge-pill.running.positive {
  color: #e11d48;
}

.stmt-badge-pill.running.cleared {
  color: #0f766e;
}

.stmt-badge-ref {
  font-size: 0.74rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  display: inline-block;
  margin-top: 0.2rem;
}

/* Statement Table Footer */
.stmt-table-tfoot tr td {
  background: #f8fafc;
  font-weight: 800;
  border-top: 2px solid #0f1f2c;
  padding: 1.25rem 1.25rem;
  font-size: 0.95rem;
}

/* Signatures & Certification Seal */
.statement-signatures-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.stmt-sign-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
}

.stmt-sign-line {
  width: 100%;
  height: 1px;
  background: #cbd5e1;
  margin-bottom: 0.65rem;
}

.stmt-sign-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.stmt-sign-subtitle {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

/* ====================================================
   COMBINED STATEMENT (SWISS EDITORIAL 1-PAGE DESIGN)
   Inspired by Reference Mockup (Clean 1-Page Layout)
   ==================================================== */
.cs-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f1f5f9;
  padding: 0.2rem;
  border-radius: var(--radius-pill);
}

.cs-view-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition);
}

.cs-view-btn:hover {
  color: #0f766e;
}

.cs-view-btn.active {
  background: #ffffff;
  color: #0d9488;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.combined-statement-wrapper {
  background: #333a42; /* Charcoal backdrop showcasing the pristine white paper sheet */
  border-radius: 20px;
  padding: 2.25rem 1.5rem;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.18);
}

.combined-statement-sheet {
  display: none; /* Hidden on screen — screen displays Detailed Ledger view */
  background: #ffffff;
  width: 100%;
  max-width: 800px;
  padding: 2.75rem 3.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  position: relative;
  border-radius: 4px;
}

/* Brand & Header */
.cs-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.cs-brand-mark {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #000000;
}

.cs-company-details {
  text-align: right;
  font-size: 0.76rem;
  color: #8b95a5;
  line-height: 1.45;
  font-weight: 500;
}

/* Main Statement Title */
.cs-title-band {
  text-align: center;
  margin-bottom: 1.75rem;
}

.cs-main-title {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #5f6c7b;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cs-sub-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0.25rem;
}

.cs-period-tag {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.cs-borrower-block {
  text-align: right;
}

.cs-borrower-tag {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.cs-borrower-subtag {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Section Row: 2-column structure matching user reference */
.cs-section-row {
  display: flex;
  margin-bottom: 0.85rem;
  page-break-inside: avoid;
}

.cs-label-col {
  width: 140px;
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #6b7785;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-top: 0.35rem;
}

.cs-content-col {
  flex: 1;
}

/* Divider Lines */
.cs-divider-thick {
  width: 100%;
  height: 1.5px;
  background: #0f172a;
  margin: 0.35rem 0;
}

.cs-divider-thin {
  width: 100%;
  height: 1px;
  background: #cbd5e1;
  margin: 0.35rem 0;
}

/* Financial Line Items */
.cs-line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

.cs-line-item.bold-line {
  font-weight: 800;
  color: #0f172a;
}

.cs-sub-heading-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  padding: 0.25rem 0;
}

.cs-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.15rem 0 0.35rem 0;
}

.cs-item-subline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.84rem;
  color: #475569;
  padding-left: 0.5rem;
}

.cs-item-subline .item-name {
  color: #64748b;
  font-weight: 500;
}

.cs-item-subline .item-val {
  font-weight: 600;
  color: #334155;
}

/* Closing Line */
.cs-closing-line {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  padding-top: 0.2rem;
}

.cs-currency-note {
  text-align: right;
  font-size: 0.74rem;
  color: #8b95a5;
  margin-top: 0.25rem;
}

/* Signatures */
.cs-signatures-row {
  display: flex;
  justify-content: space-between;
  margin-top: 2.25rem;
  padding-top: 0.75rem;
  page-break-inside: avoid;
}

.cs-sign-col {
  width: 190px;
  text-align: center;
}

.cs-sign-line {
  width: 100%;
  height: 1px;
  background: #0f172a;
  margin-bottom: 0.4rem;
}

.cs-sign-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
}

/* ----------------------------------------------------
   PRINT OPTIMIZATION (GUARANTEED 1-PAGE OUTPUT)
   ---------------------------------------------------- */
@page {
  size: A4 portrait;
  margin: 10mm 12mm;
}

@media print {
  html, body {
    height: 100% !important;
    background: #ffffff !important;
    font-size: 10pt !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .top-navbar,
  .hero-greeting-section,
  .mobile-dock-nav,
  .toast-container,
  .btn-pill,
  .statement-control-bar,
  .cs-view-switcher,
  .statement-doc-canvas,
  #viewDashboard,
  #viewCrud {
    display: none !important;
  }
  .app-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .page-view {
    display: none !important;
  }
  .page-view#viewStatement,
  .page-view.active#viewStatement {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Swiss-Style Combined 1-Page Statement (Dedicated Print Design Matching Reference Mockup) */
  .combined-statement-sheet {
    display: block !important;
    background: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    border: none !important;
    page-break-inside: avoid !important;
  }

  .combined-statement-sheet .cs-top-row {
    margin-bottom: 1.15rem !important;
  }

  .combined-statement-sheet .cs-brand-mark {
    font-size: 2.75rem !important;
    font-weight: 900 !important;
    color: #000000 !important;
  }

  .combined-statement-sheet .cs-title-band {
    margin-bottom: 1.15rem !important;
  }

  .combined-statement-sheet .cs-main-title {
    font-size: 1.85rem !important;
  }

  .combined-statement-sheet .cs-section-row {
    margin-bottom: 0.65rem !important;
    page-break-inside: avoid !important;
  }

  .combined-statement-sheet .cs-label-col {
    width: 135px !important;
    font-size: 0.95rem !important;
  }

  .combined-statement-sheet .cs-divider-thick {
    margin: 0.25rem 0 !important;
  }

  .combined-statement-sheet .cs-divider-thin {
    margin: 0.2rem 0 !important;
  }

  .combined-statement-sheet .cs-signatures-row {
    margin-top: 1.75rem !important;
    page-break-inside: avoid !important;
  }
}

/* ----------------------------------------------------
   PIN SECURITY GATEWAY (Military-Grade PIN Auth - HirelyUK Match)
   ---------------------------------------------------- */
.pin-login-page-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 20%, rgba(204, 251, 241, 0.6), #f8fafc 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Instant 0ms Session Preservation (Never re-ask PIN on page refresh while active) */
html.session-authenticated .pin-login-page-wrap {
  display: none !important;
}

html.session-authenticated .app-container {
  display: block !important;
}

.pin-login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
  position: relative;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-login-accent-bar {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, #0d9488, #059669, #14b8a6);
}

.pin-login-header {
  padding: 1.75rem 2rem 1rem 2rem;
  text-align: center;
}

.pin-login-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.12);
}

.pin-login-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.pin-login-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

.pin-lockout-banner {
  margin: 0 2rem 1.25rem 2rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  text-align: center;
}

.pin-lockout-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 800;
  color: #991b1b;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.pin-lockout-desc {
  font-size: 0.8rem;
  color: #7f1d1d;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.pin-lockout-countdown {
  font-size: 1.85rem;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #dc2626;
  letter-spacing: 0.12em;
}

.pin-error-banner {
  margin: 0 2rem 1.25rem 2rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

#otpLoginForm {
  padding: 0 2rem 1.75rem 2rem;
}

.pin-otp-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  padding: 0 0.25rem;
}

.pin-otp-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pin-attempts-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #ccfbf1;
  transition: all 0.2s ease;
}

.pin-otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.otp-box {
  width: 100%;
  height: 52px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.otp-box:focus {
  border-color: #0d9488;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
  transform: translateY(-2px);
}

.otp-box.filled {
  border-color: #0d9488;
  background: #f0fdfa;
}

.otp-box:disabled {
  background: #f1f5f9;
  border-color: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.6;
}

.pin-login-btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 12px;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

.pin-login-btn:hover:not(:disabled) {
  background: #0d9488;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.32);
}

.pin-login-btn:disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

.pin-login-footer {
  padding: 1rem 2rem;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #64748b;
  text-align: center;
}

.pin-login-footer code {
  background: #e2e8f0;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  color: #0f172a;
}

.pin-modal-error {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-lock-dashboard:hover {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake-animation {
  animation: shake 0.45s ease-in-out;
}

/* ----------------------------------------------------
   RECOVERY PROGRESS MODAL STYLES
   ---------------------------------------------------- */
.recovery-modal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 1.25rem;
  flex-wrap: wrap;
}

.rec-hero-main {
  display: flex;
  flex-direction: column;
}

.rec-hero-number {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #0d9488 0%, #065f46 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rec-hero-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.rec-badge-active {
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.rec-formula-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.rec-capital-grid {
  display: flex;
  gap: 0.75rem;
  flex: 1;
}

.rec-capital-card {
  flex: 1;
  background: #ffffff;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.rec-capital-card.repaid {
  border-left: 3.5px solid #0d9488;
}

.rec-capital-card.outstanding {
  border-left: 3.5px solid #0284c7;
}

.rec-cap-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rec-cap-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.2rem 0;
  line-height: 1.1;
}

.rec-cap-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.rec-track-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rec-track-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.rec-progress-bar-shell {
  width: 100%;
  height: 18px;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: hidden;
  display: flex;
}

.rec-progress-fill-teal {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rec-progress-fill-hatched {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #f8fafc,
    #f8fafc 6px,
    #e2e8f0 6px,
    #e2e8f0 12px
  );
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rec-track-milestones {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  padding: 0 4px;
}

.rec-borrowers-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rec-list-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
}

.rec-table-scroller {
  border: 1px solid #edf2f7;
  border-radius: 12px;
  overflow: hidden;
}

.rec-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.rec-mini-table th {
  background: #f8fafc;
  padding: 0.55rem 0.85rem;
  color: #475569;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #e2e8f0;
}

.rec-mini-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-size: 0.8rem;
}

.rec-mini-table tr:hover td {
  background: #f8fafc;
}

.rec-status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.rec-status-badge.cleared {
  background: #dcfce7;
  color: #15803d;
}

.rec-status-badge.partial {
  background: #e0f2fe;
  color: #0369a1;
}

.rec-status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.rec-audit-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.rec-audit-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.15);
}

.rec-audit-text {
  font-size: 0.8rem;
  color: #0f766e;
  line-height: 1.45;
}

/* ----------------------------------------------------
   QUICK SUMMARY BENTO TILES (CARD 5 REPLACEMENT)
   ---------------------------------------------------- */
/* ====================================================
   CARD 5: NEXT-GEN EXECUTIVE QUICK SUMMARY BENTO GRID
   ==================================================== */
.card-quick-summary {
  display: flex;
  flex-direction: column;
}

.qs-live-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qs-live-status-pill.alert-pill {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

/* Segmented View Switcher Pill */
.qs-segment-control {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #e2e8f0;
}

.qs-segment-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 750;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.qs-segment-btn:hover {
  color: #0f172a;
}

.qs-segment-btn.active {
  background: #ffffff;
  color: #0f766e;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Bento 6-Tile Grid */
.qs-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

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

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

/* Individual Luxury Bento Tiles */
.qs-bento-tile {
  position: relative;
  border-radius: 16px;
  padding: 1.1rem 1.15rem 0.95rem 1.15rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
  box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.qs-bento-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
}

/* Themes per tile */
.qs-bento-tile.tile-disbursed {
  background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
  border-color: #bae6fd;
}
.qs-bento-tile.tile-disbursed:hover {
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.16);
}

.qs-bento-tile.tile-recovered {
  background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
  border-color: #bbf7d0;
}
.qs-bento-tile.tile-recovered:hover {
  border-color: #4ade80;
  box-shadow: 0 10px 24px -4px rgba(22, 163, 74, 0.16);
}

.qs-bento-tile.tile-installment {
  background: linear-gradient(145deg, #ffffff 0%, #f0fdfa 100%);
  border-color: #99f6e4;
}
.qs-bento-tile.tile-installment:hover {
  border-color: #2dd4bf;
  box-shadow: 0 10px 24px -4px rgba(13, 148, 136, 0.16);
}

.qs-bento-tile.tile-date {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-color: #e2e8f0;
}
.qs-bento-tile.tile-date:hover {
  border-color: #94a3b8;
  box-shadow: 0 10px 24px -4px rgba(71, 85, 105, 0.12);
}

.qs-bento-tile.tile-tenure {
  background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
  border-color: #fde68a;
}
.qs-bento-tile.tile-tenure:hover {
  border-color: #f59e0b;
  box-shadow: 0 10px 24px -4px rgba(217, 119, 6, 0.16);
}

.qs-bento-tile.tile-balance.alert-mode {
  background: linear-gradient(145deg, #ffffff 0%, #fff1f2 100%);
  border-color: #fecdd3;
  box-shadow: 0 4px 14px -3px rgba(225, 29, 72, 0.12);
}
.qs-bento-tile.tile-balance.alert-mode:hover {
  border-color: #f43f5e;
  box-shadow: 0 10px 24px -4px rgba(225, 29, 72, 0.22);
}

.qs-bento-tile.tile-balance.cleared-mode {
  background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
  border-color: #a7f3d0;
  box-shadow: 0 4px 14px -3px rgba(16, 185, 129, 0.12);
}
.qs-bento-tile.tile-balance.cleared-mode:hover {
  border-color: #10b981;
  box-shadow: 0 10px 24px -4px rgba(16, 185, 129, 0.22);
}

.qs-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.qs-tile-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}

.qs-tile-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.qs-bento-tile:hover .qs-tile-icon-badge {
  transform: scale(1.08);
}

.qs-tile-icon-badge.blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
}

.qs-tile-icon-badge.teal {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
}

.qs-tile-icon-badge.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.qs-tile-icon-badge.slate {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #ffffff;
}

.qs-tile-icon-badge.amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

.qs-tile-icon-badge.rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
}

.qs-tile-amount {
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qs-tile-amount.blue { color: #0284c7; }
.qs-tile-amount.teal { color: #0d9488; }
.qs-tile-amount.amber-text { color: #d97706; }
.qs-tile-amount.rose { color: #e11d48; }

.qs-tile-amount.mono-date {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.qs-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qs-tile-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====================================================
   LUXURY PAKISTANI FISCAL YEAR SELECTOR COMPONENT
   ==================================================== */
.luxury-fy-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 12px;
  padding: 0.35rem 0.85rem 0.35rem 0.55rem;
  box-shadow: 0 4px 12px -2px rgba(13, 148, 136, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.luxury-fy-selector:hover {
  border-color: #14b8a6;
  background: linear-gradient(135deg, #ffffff 0%, #e6fffa 100%);
  box-shadow: 0 6px 18px -2px rgba(13, 148, 136, 0.2), 0 0 0 3px rgba(45, 212, 191, 0.16);
  transform: translateY(-1px);
}

.luxury-fy-selector:focus-within {
  border-color: #0d9488;
  box-shadow: 0 6px 20px -2px rgba(13, 148, 136, 0.26), 0 0 0 3.5px rgba(20, 184, 166, 0.22);
}

.luxury-fy-icon-badge {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.28);
  transition: transform 0.2s ease;
}

.luxury-fy-selector:hover .luxury-fy-icon-badge {
  transform: scale(1.05);
}

.fy-pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 6px #10b981;
  animation: fyPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fyPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 6px #10b981;
  }
  50% {
    opacity: 0.6;
    transform: scale(1.25);
    box-shadow: 0 0 10px #10b981, 0 0 14px rgba(16, 185, 129, 0.4);
  }
}

.luxury-fy-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 175px;
}

.luxury-fy-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.luxury-fy-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1;
}

.luxury-fy-cycle-tag {
  font-size: 0.58rem;
  font-weight: 800;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.luxury-fy-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.luxury-fy-native-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  color: #0f172a;
  cursor: pointer;
  padding: 0.15rem 1.4rem 0.15rem 0;
  line-height: 1.25;
  transition: color 0.2s ease;
}

.luxury-fy-selector:hover .luxury-fy-native-select {
  color: #0f766e;
}

.luxury-fy-native-select option {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  padding: 0.5rem;
}

.luxury-fy-chevron {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #0d9488;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.luxury-fy-selector:hover .luxury-fy-chevron {
  transform: translateY(-50%) scale(1.15);
  color: #0f766e;
}

.luxury-fy-active-pill {
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.luxury-fy-active-pill.active-glow {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}



