/* ==========================================================================
   NALAM HOMES — MODERN SAAS LIGHT & GLOWING OFFICE PORTAL
   Style: Futuristic Light Mesh Theme (Soft Blue Ambient Glow, Lime Highlights,
          Floating 3D Glass Cards, Ultra-Clean Modern SaaS Dashboard)
   Reference: Shasanko Creations SaaS Style
   ========================================================================== */

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

:root {
  /* Brand Palettes */
  --primary-blue: #2563eb;
  --primary-dark: #0f172a;
  --primary-black: #090d16;
  --accent-lime: #ccff00;
  --accent-lime-hover: #b8e600;
  --accent-lime-light: #f4ffe0;
  
  --sky-50: #f0f7ff;
  --sky-100: #e0effe;
  --sky-200: #bae0fd;
  --sky-300: #7cc5fb;
  --sky-400: #38a7f7;
  --sky-500: #0e8be7;
  --sky-600: #026dc5;
  
  --purple-glow: rgba(167, 139, 250, 0.25);
  --blue-glow: rgba(96, 165, 250, 0.35);

  /* Surface & Backgrounds */
  --bg-body-gradient: radial-gradient(circle at 10% 15%, #bfdbfe 0%, transparent 42%),
                      radial-gradient(circle at 90% 15%, #93c5fd 0%, transparent 45%),
                      radial-gradient(circle at 50% 90%, #dbeafe 0%, transparent 50%),
                      #dbeafe;
  --bg-canvas: #f8fbff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-subtle: #f4f8fc;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-glass-card: rgba(255, 255, 255, 0.85);

  /* Text Colors */
  --text-main: #0f172a;
  --text-heading: #090d16;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  /* Status Colors */
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-text: #047857;

  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --amber-text: #b45309;

  --rose-500: #f43f5e;
  --rose-100: #ffe4e6;
  --rose-text: #be123c;

  /* Borders & Shadows */
  --border-glass: rgba(255, 255, 255, 0.9);
  --border-subtle: #e2eaf5;
  --border-active: #2563eb;
  
  --shadow-ambient: 0 20px 45px -15px rgba(37, 99, 235, 0.12), 0 0 1px 1px rgba(255, 255, 255, 0.9);
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8);
  --shadow-hover: 0 22px 50px -12px rgba(37, 99, 235, 0.2), 0 0 0 1px #ccff00;
  --shadow-floating: 0 25px 60px -15px rgba(30, 58, 138, 0.2);

  /* Geometry */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --header-height: 76px;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-body-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select {
  -webkit-user-select: auto !important;
  user-select: auto !important;
}

/* Portal App Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem 2.5rem;
}

/* ==========================================================================
   1. FLOATING MODERN HEADER & NAVIGATION
   ========================================================================== */
.portal-header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 35px -10px rgba(37, 99, 235, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.8);
  padding: 0.6rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-img-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: #ffffff;
  transition: transform var(--transition-smooth);
}

.brand-section:hover .brand-img-logo {
  transform: scale(1.05);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #090d16;
  letter-spacing: -0.03em;
}

.brand-title span.logo-symbol {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.35rem;
  color: #090d16;
  letter-spacing: -0.05em;
}

.brand-title span.portal-pill {
  font-size: 0.62rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0284c7;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav Menu Tabs */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-smooth);
  font-family: inherit;
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: #090d16;
  background: rgba(0, 0, 0, 0.04);
}

.nav-tab-btn.active {
  color: #090d16;
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.nav-tab-btn .badge-counter {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: #f1f5f9;
  color: #475569;
}

.nav-tab-btn.active .badge-counter {
  background: #090d16;
  color: #ffffff;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.round-icon-btn:hover {
  background: #f8fafc;
  color: #090d16;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.staff-pill-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.staff-pill-switcher select {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #090d16;
  cursor: pointer;
  outline: none;
}

.btn-black-pill {
  background: #090d16;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  font-family: inherit;
}

.btn-black-pill:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-lime-pill {
  background: var(--accent-lime);
  color: #090d16;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 18px rgba(204, 255, 0, 0.45);
  font-family: inherit;
  text-decoration: none;
}

.btn-lime-pill:hover {
  background: var(--accent-lime-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(204, 255, 0, 0.6);
}

.btn-ghost-pill {
  background: #ffffff;
  color: #090d16;
  border: 1px solid #e2e8f0;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-smooth);
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.btn-ghost-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* ==========================================================================
   2. HERO SHOWCASE SECTION (MATCHING REFERENCE DESIGN)
   ========================================================================== */
.hero-showcase {
  text-align: center;
  padding: 2.25rem 1rem 3rem;
  position: relative;
}

.hero-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 1.15rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.06);
}

.hero-tag-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-headline {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: #090d16;
  line-height: 1.15;
  letter-spacing: -0.04em;
  max-width: 860px;
  margin: 0 auto 1.15rem;
}

.lime-highlight {
  background: var(--accent-lime);
  color: #090d16;
  padding: 0.05em 0.35em;
  border-radius: 12px;
  display: inline-block;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-subtext {
  font-size: 1.05rem;
  color: #475569;
  max-width: 640px;
  margin: 0 auto 1.85rem;
  font-weight: 500;
  line-height: 1.55;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   3. FLOATING SHOWCASE 5-CARDS ROW (EXACT REFERENCE REPLICATION)
   ========================================================================== */
.showcase-cards-deck {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1fr 1.1fr;
  gap: 1.25rem;
  align-items: flex-end;
  margin-bottom: 3.5rem;
  perspective: 1000px;
}

/* Card Common */
.showcase-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-ambient);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -10px rgba(37, 99, 235, 0.2);
}

/* Card 1: Left Analytics Sparkline Card */
.deck-card-chart {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transform: rotate(-2deg);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deck-card-chart .chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deck-card-chart .chart-pill {
  background: var(--accent-lime-light);
  color: #2e5900;
  border: 1px solid #d4f880;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-svg-container {
  width: 100%;
  height: 90px;
  margin: 0.75rem 0;
}

.chart-bottom-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.chart-bottom-meta span.metric-tag {
  background: #090d16;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* Card 2: 150,000+ Stat Gradient Mesh Card */
.deck-card-stat {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(219, 234, 254, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.95);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
}

.deck-card-stat h3 {
  font-size: 1.45rem;
  font-weight: 900;
  color: #090d16;
  letter-spacing: -0.03em;
}

.deck-card-stat p {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.abstract-3d-visual {
  width: 100%;
  height: 95px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 30% 30%, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.4);
}

.abstract-3d-visual::after {
  content: '';
  position: absolute;
  inset: -10px;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.5) 50%, transparent 60%);
  animation: shine 4s infinite linear;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Card 3: Team / Staff Consultation Photo Card */
.deck-card-team {
  background: #3b82f6;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  min-height: 255px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  position: relative;
}

.deck-card-team .avatar-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.deck-card-team .team-content-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(0deg, rgba(9, 13, 22, 0.85) 0%, transparent 100%);
  margin: -1.25rem;
  padding: 1.25rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.deck-card-team h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.deck-card-team p {
  font-size: 0.72rem;
  color: #cbd5e1;
}

/* Card 4: Verified Site Visits Card */
.deck-card-hologram {
  background: linear-gradient(135deg, #f43f5e 0%, #8b5cf6 60%, #3b82f6 100%);
  color: #ffffff;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.deck-card-hologram h3 {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.deck-card-hologram p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
}

.holo-tag {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-block;
}

/* Card 5: Right Balance Card */
.deck-card-balance {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transform: rotate(2deg);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deck-card-balance .balance-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}

.deck-card-balance .balance-amount {
  font-size: 1.55rem;
  font-weight: 900;
  color: #090d16;
  letter-spacing: -0.03em;
  margin: 0.5rem 0;
}

.deck-card-balance .balance-status-tag {
  background: var(--accent-lime-light);
  color: #234800;
  border: 1px solid #d4f880;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   4. DASHBOARD OPERATIONS & KPI SECTION
   ========================================================================== */
.section-headline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-headline-bar h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #090d16;
  letter-spacing: -0.02em;
}

.section-headline-bar p {
  font-size: 0.85rem;
  color: #64748b;
}

/* KPI Summary Cards Grid */
.modern-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.modern-kpi-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

.modern-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px -10px rgba(37, 99, 235, 0.15);
  border-color: #93c5fd;
}

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

.kpi-top-row span.kpi-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon-pill {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.kpi-icon-pill.blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-pill.purple { background: #f5f3ff; color: #7c3aed; }
.kpi-icon-pill.amber { background: #fffbeb; color: #d97706; }
.kpi-icon-pill.green { background: #ecfdf5; color: #059669; }
.kpi-icon-pill.rose { background: #fff1f2; color: #e11d48; }

.modern-kpi-card .kpi-num {
  font-size: 1.55rem;
  font-weight: 900;
  color: #090d16;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.modern-kpi-card .kpi-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.modern-kpi-card .kpi-desc span.positive {
  color: #059669;
  font-weight: 700;
}

/* Quick Action Strip */
.quick-action-dock {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.quick-action-dock .dock-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #090d16;
}

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

/* 2-Column Dashboard Feeds */
.dashboard-feeds-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feed-card-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}

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

.feed-card-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #090d16;
}

.feed-card-header button.btn-text {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
}

.feed-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feed-item-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--transition-smooth);
}

.feed-item-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.feed-item-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #090d16;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-initials.blue { background: #2563eb; }
.avatar-initials.emerald { background: #059669; }
.avatar-initials.purple { background: #7c3aed; }

.feed-meta h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #090d16;
}

.feed-meta p {
  font-size: 0.75rem;
  color: #64748b;
}

.feed-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.btn-action-icon.whatsapp {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.btn-action-icon.whatsapp:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-action-icon.call {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.btn-action-icon.call:hover {
  background: #2563eb;
  color: #ffffff;
}

/* ==========================================================================
   5. PAGES & DEDICATED SECTIONS (CUSTOMER ENTRY, CUSTOMERS, FINANCE, ETC.)
   ========================================================================== */
.app-view-page {
  display: none;
  animation: fadeInPage 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

/* Form Shell Wrapper */
.form-shell-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  max-width: 900px;
  margin: 0 auto 3rem;
  box-shadow: var(--shadow-ambient);
}

.form-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.form-shell-header h1 {
  font-size: 1.65rem;
  font-weight: 900;
  color: #090d16;
  letter-spacing: -0.03em;
}

.form-shell-header p {
  font-size: 0.85rem;
  color: #64748b;
}

.form-section-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #090d16;
  margin-bottom: 1.25rem;
}

.form-section-title .section-step-num {
  width: 26px;
  height: 26px;
  background: #090d16;
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.form-row-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.form-row-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

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

.form-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.form-field label span.star {
  color: #e11d48;
}

.form-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  font-family: inherit;
  font-size: 0.88rem;
  color: #090d16;
  outline: none;
  transition: all var(--transition-smooth);
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Chip Pickers */
.chip-picker-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.picker-chip {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.picker-chip:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.picker-chip.selected {
  background: #090d16;
  color: #ffffff;
  border-color: #090d16;
}

/* Success Banner */
.success-card-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  display: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.success-card-banner * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.success-card-banner.show {
  display: block;
}

/* Staff Balance Cards Grid & Interactive Cards */
.staff-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.staff-balance-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.staff-balance-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -10px rgba(37, 99, 235, 0.16);
  border-color: #93c5fd;
}

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

.staff-avatar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.staff-card-header-row h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #090d16;
}

.staff-card-header-row p {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.staff-balance-display {
  background: #f8fbff;
  border: 1px solid #e2eaf5;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
}

.staff-balance-display .balance-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.staff-balance-display .balance-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: #047857;
  letter-spacing: -0.02em;
}

.staff-balance-display .balance-note {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.staff-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.btn-update-bal {
  background: var(--accent-lime);
  color: #090d16;
  border: 1px solid #c0ee10;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-smooth);
}

.btn-update-bal:hover {
  background: var(--accent-lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(204, 255, 0, 0.4);
}

/* Staff Profile Details Cards */
.staff-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.staff-profile-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
}

.staff-profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -10px rgba(37, 99, 235, 0.18);
  border-color: #93c5fd;
}

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

.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.profile-avatar-block h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #090d16;
}

.profile-avatar-block p {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.profile-data-list {
  background: #f8fbff;
  border: 1px solid #e2eaf5;
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  gap: 0.5rem;
}

.profile-data-row span.label {
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-data-row span.val {
  color: #090d16;
  font-weight: 800;
  font-family: var(--font-mono);
}

.profile-data-row a.val-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.profile-data-row a.val-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.profile-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
}

/* Staff Profile Photo & Avatar Styles */
.profile-avatar-wrapper {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.profile-avatar-wrapper:hover {
  transform: scale(1.06);
}

.profile-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  background: #f1f5f9;
  flex-shrink: 0;
  display: block;
}

.profile-avatar-img.sm {
  width: 38px;
  height: 38px;
  border-width: 2px;
}

.profile-avatar-img.lg {
  width: 76px;
  height: 76px;
  border-width: 3px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.avatar-camera-overlay {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #0f172a;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.profile-avatar-wrapper:hover .avatar-camera-overlay {
  background: #2563eb;
  transform: scale(1.15);
}

/* Modal Photo Upload Component */
.staff-photo-upload-card {
  background: #f8fbff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.staff-photo-upload-card:hover {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.modal-avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.modal-avatar-preview-box {
  position: relative;
  width: 76px;
  height: 76px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.modal-avatar-preview-box:hover {
  transform: scale(1.05);
}

.modal-avatar-initials {
  width: 76px !important;
  height: 76px !important;
  border-radius: 50% !important;
  font-size: 1.6rem !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.modal-avatar-photo {
  width: 76px !important;
  height: 76px !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 3px solid #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.modal-avatar-cam-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: #2563eb;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.modal-avatar-desc {
  flex: 1;
}

/* Modern Card Grid for Directory View */
.cards-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.directory-customer-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.directory-customer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -10px rgba(37, 99, 235, 0.15);
}

.card-top-identity {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.card-top-identity h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #090d16;
}

.badge-tag-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.badge-tag-pill.hot { background: #ffe4e6; color: #be123c; }
.badge-tag-pill.warm { background: #fef3c7; color: #b45309; }
.badge-tag-pill.cold { background: #f1f5f9; color: #64748b; }
.badge-tag-pill.booked { background: #d1fae5; color: #047857; }

.customer-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #475569;
  margin-bottom: 1.15rem;
}

.customer-detail-list .detail-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.45);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: var(--shadow-floating);
  animation: popModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #090d16;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
}

/* Grouped Dropdown Hierarchy Styles */
select.form-input optgroup {
  font-weight: 800;
  color: #0f172a;
  background: #f1f5f9;
  padding: 6px 4px;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

select.form-input option {
  font-weight: 500;
  color: #334155;
  background: #ffffff;
  padding: 6px 12px;
  font-size: 0.86rem;
}

/* Toast Alerts */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #090d16;
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-smooth);
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Live Database Sync Indicator Pill */
.live-db-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

.pulse-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tracker Metrics Grid */
.tracker-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tracker-kpi-card {
  background: #ffffff;
  border: 1px solid #e2eaf5;
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-smooth);
}

.tracker-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.tracker-kpi-card .kpi-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.tracker-kpi-card .kpi-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: #090d16;
  letter-spacing: -0.02em;
}

.tracker-kpi-card .kpi-val.emerald { color: #059669; }
.tracker-kpi-card .kpi-val.rose { color: #e11d48; }

.tracker-kpi-card .kpi-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Tracker Toolbar & Filters */
.tracker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #e2eaf5;
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.85rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.tracker-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
}

.filter-pill {
  border: 1px solid transparent;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-smooth);
}

.filter-pill:hover {
  background: #e2eaf5;
  color: #090d16;
}

.filter-pill.active {
  background: #090d16;
  color: #ffffff;
}

.tracker-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  min-width: 260px;
}

.tracker-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.8rem;
  color: #0f172a;
  width: 100%;
}

/* Tracker Feed List Items */
.tracker-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tracker-event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  transition: all var(--transition-smooth);
}

.tracker-event-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
  transform: translateX(3px);
}

.tracker-event-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.tracker-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.tracker-icon-badge.customer { background: #eff6ff; color: #2563eb; }
.tracker-icon-badge.payment { background: #ecfdf5; color: #059669; }
.tracker-icon-badge.expense { background: #fff1f2; color: #e11d48; }
.tracker-icon-badge.balance { background: #f5f3ff; color: #7c3aed; }
.tracker-icon-badge.profile { background: #fffbeb; color: #d97706; }

.tracker-meta h4 {
  font-size: 0.86rem;
  font-weight: 800;
  color: #090d16;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tracker-meta p {
  font-size: 0.77rem;
  color: #64748b;
  margin: 0;
}

.tracker-event-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: right;
}

.btn-inspect-json {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-inspect-json:hover {
  background: #090d16;
  color: #ffffff;
  border-color: #090d16;
}

.json-payload-display {
  background: #090d16;
  color: #38bdf8;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  max-height: 400px;
  overflow: auto;
  border: 1px solid #1e293b;
}

/* Timeframe Dock & View Mode Toggle */
.tracker-timeframe-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.timeframe-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid #e2eaf5;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.65rem;
}

.time-pill {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.time-pill:hover {
  background: #f1f5f9;
  color: #090d16;
}

.time-pill.active {
  background: #090d16;
  color: #ffffff;
}

.tracker-view-toggle {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
}

.view-toggle-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-smooth);
}

.view-toggle-btn:hover {
  color: #090d16;
}

.view-toggle-btn.active {
  background: #ffffff;
  color: #090d16;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Monthly & Yearly Report Table */
.report-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.report-data-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.report-data-table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-weight: 600;
}

.report-data-table tbody tr:hover {
  background: #f8fbff;
}

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

/* Mobile Floating Bottom Navigation Dock */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid #e2eaf5;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 2500;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: 1;
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: all var(--transition-smooth);
}

.mobile-nav-item * {
  pointer-events: none;
}

.mobile-nav-item svg {
  stroke-width: 2.2;
}

.mobile-nav-item.active {
  color: #2563eb;
  background: #eff6ff;
}

.mobile-nav-item.active svg {
  stroke: #2563eb;
}

/* Mobile Header 3-Dots Menu Button */
.mobile-dots-menu-btn {
  display: none;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  color: #090d16;
  padding: 0.45rem 0.55rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 38px;
  min-width: 38px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--transition-smooth);
}

.mobile-dots-menu-btn * {
  pointer-events: none;
}

.mobile-dots-menu-btn:hover {
  background: #e2e8f0;
}

@media (max-width: 768px) {
  .mobile-dots-menu-btn {
    display: inline-flex;
  }
}

/* Mobile Slide-Up Quick Navigation Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease-out, visibility 0.25s;
}

.mobile-drawer-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.mobile-drawer-sheet {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 0.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.25);
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-overlay.active .mobile-drawer-sheet {
  transform: translateY(0);
}

.mobile-drawer-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 10px;
  margin: 0.25rem auto 0.85rem;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1rem;
}

.mobile-drawer-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #64748b;
  cursor: pointer;
  touch-action: manipulation;
}

.mobile-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 380px) {
  .mobile-drawer-grid {
    grid-template-columns: 1fr;
  }
}

.drawer-nav-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: all var(--transition-smooth);
}

.drawer-nav-card * {
  pointer-events: none;
}

.drawer-nav-card:hover, .drawer-nav-card:active {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

.drawer-nav-card .drawer-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.drawer-nav-card .drawer-text {
  display: flex;
  flex-direction: column;
}

.drawer-nav-card .drawer-text strong {
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.2;
}

.drawer-nav-card .drawer-text span {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.2;
}

.drawer-card-highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.drawer-card-highlight:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.mobile-drawer-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.85rem;
}

.btn-drawer-signout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .showcase-cards-deck {
    grid-template-columns: repeat(2, 1fr);
  }
  .deck-card-hologram, .deck-card-balance {
    display: none;
  }
  .header-nav {
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .header-nav::-webkit-scrollbar {
    display: none;
  }
  .tracker-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
  }

  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  }

  /* Form inputs: 16px minimum prevents iOS Safari auto-zoom on tap */
  .form-input,
  input[type="text"],
  input[type="number"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="time"],
  select,
  textarea,
  .login-input {
    font-size: 16px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
    touch-action: manipulation;
    box-sizing: border-box;
  }

  /* Buttons: Comfortable 44px touch targets */
  button,
  .btn-lime-pill,
  .btn-black-pill,
  .btn-ghost-pill,
  .picker-chip,
  .btn-action-icon,
  .mobile-nav-item {
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .picker-chip {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .portal-header {
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-nav {
    display: none; /* Replaced by bottom nav dock on mobile */
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .app-container {
    padding: 0.5rem 0.5rem calc(80px + env(safe-area-inset-bottom, 0px)) 0.5rem;
  }

  .hero-showcase {
    padding: 1.5rem 1rem 1.25rem;
  }

  .hero-headline {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .hero-subtext {
    font-size: 0.85rem;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-cta-group button {
    width: 100%;
    justify-content: center;
  }

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

  .deck-card-chart, .deck-card-balance {
    transform: none;
  }

  .modern-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .dashboard-feeds-layout {
    grid-template-columns: 1fr;
  }

  .staff-balance-grid, .staff-profiles-grid {
    grid-template-columns: 1fr;
  }

  .form-row-grid-3, .form-row-grid-2, .form-grid-2, .form-grid-3, .split-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .tracker-metrics-grid {
    grid-template-columns: 1fr;
  }

  .tracker-event-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .tracker-event-right {
    width: 100%;
    justify-content: space-between;
  }

  .tracker-timeframe-dock {
    flex-direction: column;
    align-items: stretch;
  }

  .timeframe-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .timeframe-pills::-webkit-scrollbar {
    display: none;
  }

  .modal-box {
    width: 95%;
    max-height: 86vh;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .modern-kpi-grid {
    grid-template-columns: 1fr;
  }
  .brand-title span:first-child {
    font-size: 1.05rem;
  }
  .portal-pill {
    display: none;
  }
}

/* ========================================================================= */
/* SECURE LOGIN VIEW & PROFILE GATEWAY STYLES                                */
/* ========================================================================= */
.login-view-wrapper {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f8fafc;
}

/* Moving Dots WebGL Canvas */
.login-dots-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Ambient Vignette & Radial Depth */
.login-vignette-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 2;
  pointer-events: none;
}

.login-radial-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(16, 185, 129, 0.1) 45%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 2;
}

.login-card-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 20px;
  padding: 2.75rem 2.25rem 2.25rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: loginFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-brand-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-avatar-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #090d16;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.35);
}

.login-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.login-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
}

.login-subtitle {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.login-alert-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  animation: loginShake 0.3s ease-in-out;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.login-input-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

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

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  color: #64748b;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.login-input-field {
  width: 100%;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 12px;
  padding: 0.85rem 2.85rem 0.85rem 2.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.login-input-field:focus {
  border-color: #3b82f6;
  background: rgba(2, 6, 23, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.login-input-field::placeholder {
  color: #475569;
}

.login-pwd-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.login-pwd-toggle:hover {
  color: #ffffff;
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0.15rem 0 0.35rem;
}

.login-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.login-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
  border-radius: 4px;
}

.login-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: #ffffff;
  color: #090d16;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.18);
  font-family: inherit;
}

.login-primary-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -5px rgba(255, 255, 255, 0.28);
}

.login-primary-btn:active {
  transform: translateY(0);
}

/* Quick Accounts Drawer Helper */
.login-accounts-helper {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-helper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  padding: 0.4rem 0.25rem;
  border-radius: 6px;
  transition: color 0.15s;
}

.login-helper-header:hover {
  color: #60a5fa;
}

.login-helper-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 0.75rem;
}

.login-quick-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font-size: 0.74rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.login-quick-chip:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.login-quick-chip strong {
  color: #f1f5f9;
  font-size: 0.76rem;
}

.login-quick-chip code {
  color: #94a3b8;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-footer-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

/* Header Sign Out Button */
.header-signout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.42rem 0.95rem;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.header-signout-btn:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.header-signout-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   LABOUR MANAGEMENT MODULE STYLES (EXCEL-STYLE GRID & SATURDAY SETTLEMENT)
   ========================================================================== */

/* Sub-Navigation Tabs within Labour Management */
.labour-subnav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.labour-subnav-bar::-webkit-scrollbar {
  display: none;
}

.labour-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.labour-subnav-btn:hover {
  color: var(--text-heading);
  background: rgba(241, 245, 249, 0.9);
}

.labour-subnav-btn.active {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.labour-subnav-btn.active .badge-pill-num {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.badge-pill-num {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 800;
}

/* KPI Tri-Group Cards */
.kpi-tri-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.kpi-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.kpi-group-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-blue);
}

.kpi-group-card.emerald-border::before {
  background: #10b981;
}

.kpi-group-card.purple-border::before {
  background: #8b5cf6;
}

.kpi-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed #e2e8f0;
}

.kpi-group-header h4 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  text-align: left;
}

.kpi-metric-item .m-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.kpi-metric-item .m-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

/* Excel Style Attendance Sheet */
.excel-sheet-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.excel-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 1rem;
}

.excel-filters-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.excel-filter-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
}

.excel-filter-field label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.excel-filter-field select,
.excel-filter-field input {
  border: none;
  outline: none;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.88rem;
  background: transparent;
  cursor: pointer;
}

.excel-table-container {
  overflow-x: auto;
  max-width: 100%;
}

.excel-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: center;
  background: #ffffff;
}

.excel-grid-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 0.85rem;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid #334155;
  white-space: nowrap;
}

.excel-grid-table th.rate-subhead {
  background: #1e293b;
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
}

.excel-grid-table td {
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-weight: 600;
  vertical-align: middle;
}

.excel-grid-table tbody tr:hover td {
  background: #f8fafc;
}

.excel-grid-table tbody tr.saturday-row td {
  background: #fffbeb;
  font-weight: 700;
}

.excel-grid-table tbody tr.saturday-row:hover td {
  background: #fef3c7;
}

.excel-grid-table td.date-col {
  text-align: left;
  font-weight: 700;
  background: #f8fafc;
  width: 160px;
  white-space: nowrap;
}

.excel-grid-table td.day-badge-col {
  width: 100px;
}

.excel-grid-table td.daily-total-col {
  text-align: right;
  font-weight: 800;
  color: #059669;
  background: #f0fdf4;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  width: 150px;
}

.grid-num-input {
  width: 76px;
  text-align: center;
  padding: 0.4rem 0.25rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
  outline: none;
}

.grid-num-input:focus {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  transform: scale(1.05);
}

.grid-num-input.has-value {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.excel-grid-table tfoot td {
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.85rem;
  border: 1px solid #1e293b;
}

.excel-grid-table tfoot td.grand-total {
  color: var(--accent-lime);
  font-size: 1.15rem;
  font-family: var(--font-mono);
  text-align: right;
}

/* Weekly Breakdown Calculation Summary Card */
.weekly-calc-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-floating);
}

.calc-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.calc-item-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.calc-item-pill .t-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: 4px;
}

.calc-item-pill .t-math {
  font-size: 0.78rem;
  color: #cbd5e1;
  font-family: var(--font-mono);
}

.calc-item-pill .t-sum {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  margin-top: 4px;
}

.gross-total-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.gross-total-banner .total-big-val {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--accent-lime);
  font-family: var(--font-mono);
}

/* Printable Statement Layout */
.print-statement-box {
  background: #ffffff;
  color: #000000;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.print-statement-header {
  border-bottom: 2px solid #000000;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.print-table th, .print-table td {
  border: 1px solid #000000;
  padding: 8px 12px;
  text-align: left;
}

.print-table th {
  background: #f1f5f9;
  font-weight: 700;
}

.print-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding-top: 1rem;
}

.print-sign-line {
  border-top: 1px solid #000000;
  width: 200px;
  text-align: center;
  font-size: 0.8rem;
  padding-top: 4px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printStatementArea, #printStatementArea * {
    visibility: visible;
  }
  #printStatementArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    margin: 0;
  }
/* PWA Mobile App Install Floating Banner */
.pwa-install-banner {
  position: fixed;
  bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 13, 22, 0.94);
  color: #ffffff;
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  border-radius: 50px;
  padding: 0.45rem 1rem 0.45rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.2);
  z-index: 9999;
  animation: slideUpPwa 0.35s ease-out;
  max-width: 94vw;
  width: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
}

@keyframes slideUpPwa {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.pwa-install-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #10b981;
  background: #ffffff;
  padding: 1px;
  flex-shrink: 0;
}

.pwa-install-text {
  min-width: 0;
}

.pwa-install-text strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-install-text p {
  margin: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.pwa-btn-install {
  padding: 0.4rem 0.85rem !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  background: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}

.pwa-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.pwa-btn-close:hover {
  color: #ffffff;
}

/* ========================================================================= */
/* DEDICATED MOBILE APP DOWNLOAD & INSTALLATION MODAL STYLES                */
/* ========================================================================= */
.modal-download-box {
  max-width: 480px;
  width: 100%;
  border-radius: 20px;
  background: #ffffff;
  overflow: hidden;
}

.download-tabs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin: 1rem 0 0.85rem;
}

.download-tab-btn {
  padding: 0.65rem 0.5rem;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.download-tab-btn.active {
  background: #ffffff;
  color: #090d16;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.btn-download-primary {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.4);
  margin-bottom: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-download-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(16, 185, 129, 0.5);
}

.btn-download-primary:active {
  transform: translateY(0);
}

.download-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.download-step-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.2s ease;
}

.download-step-card:hover {
  border-color: #cbd5e1;
}

.download-step-card .step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #090d16;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.download-step-card .step-info strong {
  display: block;
  font-size: 0.86rem;
  color: #0f172a;
  margin-bottom: 2px;
}

.download-step-card .step-info p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.download-alt-box {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #166534;
  line-height: 1.45;
}

.download-alt-box strong {
  display: block;
  color: #14532d;
  margin-bottom: 2px;
}

/* Header Direct Install Button */
.btn-header-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 0.42rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-header-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Login View Install Button */
.btn-install-mobile-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-install-mobile-login:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #10b981;
  color: #ffffff;
}

/* Mobile Nav Install Button Highlight */
.mobile-nav-install-btn {
  color: #10b981 !important;
  font-weight: 800 !important;
}

/* ========================================================================= */
/* MOBILE VIEWPORT & TOUCHSCREEN OPTIMIZATIONS                                */
/* ========================================================================= */
@media (max-width: 768px) {
  .login-card-container {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px;
    margin: 0 auto;
    max-width: 100%;
  }

  .login-avatar-ring {
    width: 54px;
    height: 54px;
  }

  .login-title {
    font-size: 1.4rem;
  }

  /* Bottom sheet modal styling on small phone screens */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 100%;
    margin: 0;
    animation: slideUpModal 0.25s ease-out;
  }

  @keyframes slideUpModal {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .pwa-install-banner {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    left: 12px;
    transform: none;
    border-radius: 14px;
    padding: 0.6rem 0.85rem;
  }

  .app-container {
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  }

  .btn-header-install span {
    display: none;
  }

  .btn-header-install {
    padding: 0.42rem 0.55rem;
  }
}

/* ========================================================================= */
/* DEDICATED APP INSTALL LANDING VIEW (BROWSER GATEWAY)                     */
/* ========================================================================= */
.install-landing-wrapper {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f8fafc;
}

.install-landing-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(37, 99, 235, 0.18) 40%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.install-landing-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 24px;
  padding: 2.25rem 1.75rem 1.75rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(16, 185, 129, 0.2);
  animation: loginFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.install-landing-header {
  margin-bottom: 1.25rem;
}

.install-avatar-ring {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: #ffffff;
  border: 2px solid #86efac;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.install-app-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.install-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.install-app-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 0.35rem;
}

.install-app-subtitle {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.btn-install-landing-primary {
  width: 100%;
  padding: 0.95rem 1.25rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
  margin-bottom: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-install-landing-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px -5px rgba(16, 185, 129, 0.6);
}

.btn-install-landing-primary:active {
  transform: translateY(0);
}

.install-platform-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.install-platform-btn {
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.install-platform-btn.active {
  background: #10b981;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.landing-guide-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.landing-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
}

.landing-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.landing-step-row strong {
  display: block;
  font-size: 0.84rem;
  color: #f8fafc;
  margin-bottom: 2px;
}

.landing-step-row p {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.35;
}

.landing-alt-note {
  font-size: 0.74rem;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.install-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.install-feature-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.6rem 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.install-feature-item span {
  font-size: 1.1rem;
}

.install-feature-item strong {
  font-size: 0.7rem;
  color: #cbd5e1;
  white-space: nowrap;
}

.install-landing-footer {
  text-align: center;
}

.btn-continue-browser {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-continue-browser:hover {
  color: #ffffff;
}

/* =========================================================================
   STANDALONE INSTALLED PWA APP SUPPRESSION RULES
   When running inside the installed mobile app, hide all install prompts
   ========================================================================= */
@media all and (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .btn-header-install,
  .mobile-nav-install-btn,
  .btn-install-mobile-login,
  .pwa-install-banner,
  #modalDownloadApp,
  .install-prompt-only {
    display: none !important;
  }
}

body.is-app-installed .btn-header-install,
body.is-app-installed .mobile-nav-install-btn,
body.is-app-installed .btn-install-mobile-login,
body.is-app-installed .pwa-install-banner,
body.is-app-installed #modalDownloadApp,
body.is-app-installed .install-prompt-only {
  display: none !important;
}
