/* Kalyan Multi Hub Custom Styling - Inspired by https://kalyanmultihub.com/ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --brand-navy: #050e1d;
  --brand-dark: #07152d;
  --brand-card: #0b1f3d;
  --brand-card-border: #14325a;
  --brand-gold: #f59e0b;
  --brand-gold-dark: #d97706;
  --brand-gold-light: #fef08a;
  --brand-cyan: #06b6d4;
  --brand-emerald: #10b981;
  --brand-rose: #ef4444;
}

body {
  font-family: 'Outfit', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f4f6fa;
  color: #0f172a;
}

/* Custom Scrollbar - Deep Navy & Gold Accent */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #07152d;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #fbbf24;
}

/* Website Signature Gold Gradient Utilities */
.gold-gradient-text {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-bg {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 70%, #b45309 100%);
  color: #050e1d;
  font-weight: 800;
}

/* Brand Buttons */
.brand-gold-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #050e1d;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}
.brand-gold-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.brand-navy-btn {
  background: #050e1d;
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 600;
  transition: all 0.2s ease;
}
.brand-navy-btn:hover {
  background: #0b1f3d;
  border-color: #f59e0b;
  color: #ffffff;
}

/* Glassmorphism & Cards */
.glass-panel {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.glass-panel-dark {
  background: rgba(11, 31, 61, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Sub-Navbar Tabs Active */
.tab-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #050e1d !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}

/* KPI Drilldown Subtab Active */
.kpi-subtab-btn.active {
  color: #050e1d !important;
  border-bottom-color: #f59e0b !important;
  background-color: #fef3c7 !important;
  font-weight: 800 !important;
}

/* Payout Subtab Active */
.payout-subtab-btn.active {
  color: #050e1d !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3) !important;
}

/* Statement Subtab Active */
.stmt-subtab-btn.active {
  color: #050e1d !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3) !important;
}

.kpi-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(5, 14, 29, 0.1), 0 8px 10px -6px rgba(5, 14, 29, 0.1);
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn {
  animation: fadeInScale 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Status Badges */
.badge-pending {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.badge-online {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-cash {
  background-color: #fef3c7;
  color: #78350f;
  border: 1px solid #fde68a;
}

/* Notification Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  animation: slideInUp 0.3s ease-out forwards;
  min-width: 280px;
  max-width: 400px;
}

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

/* Receipt Print View */
#printable-receipt {
  display: none;
}

/* Printable Receipt Screen Hide */
#printable-receipt {
  display: none !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm 8mm;
  }

  *, *:before, *:after {
    box-sizing: border-box !important;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    position: static !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Completely HIDE all web elements so NOTHING pushes printable-receipt down */
  body > *:not(#printable-receipt) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    position: absolute !important;
    top: -99999px !important;
    left: -99999px !important;
    pointer-events: none !important;
  }

  #app-login-screen,
  #app-main-layout,
  #top-contact-bar,
  #contract-alert-banner,
  #nav-subtabs,
  header,
  main,
  footer,
  .modal-backdrop,
  #modal-receipt-preview,
  #toast-container,
  .no-print {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: absolute !important;
    top: -99999px !important;
    left: -99999px !important;
  }

  /* Show ONLY #printable-receipt at top of page */
  #printable-receipt {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  #printable-receipt * {
    visibility: visible !important;
    color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* 2-Page Duplex Slip Controls */
  .receipt-sheet {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }

  /* PAGE 1: Front Side - Bill & Complete Payment Details (Centered Vertically on Sheet 1) */
  .receipt-page-1 {
    display: block !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 32mm !important;
    margin-bottom: auto !important;
  }

  /* PAGE 2: Back Side - Terms & Conditions (Centered Vertically on Sheet 2) */
  .receipt-page-2 {
    display: block !important;
    page-break-before: always !important;
    break-before: page !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 24mm !important;
    margin-bottom: auto !important;
  }

  /* Compact Terms (Travels, CSC, Real Estate) with fewer points centered gracefully */
  .receipt-page-2.receipt-compact-terms {
    margin-top: 38mm !important;
  }

  /* Mode: Hide Page 1 (Print Terms Only) */
  .print-hide-page-1 .receipt-page-1,
  .print-hide-page-1 .receipt-page-1-separator {
    display: none !important;
  }
  .print-hide-page-1 .receipt-page-2 {
    page-break-before: auto !important;
    break-before: auto !important;
    margin-top: 24mm !important;
  }
  .print-hide-page-1 .receipt-page-2.receipt-compact-terms {
    margin-top: 38mm !important;
  }

  /* Mode: Hide Page 2 (Print Bill Only) */
  .print-hide-page-2 .receipt-page-2,
  .print-hide-page-2 .receipt-page-1-separator {
    display: none !important;
  }
  .print-hide-page-2 .receipt-page-1 {
    page-break-after: auto !important;
    break-after: auto !important;
    margin-top: 32mm !important;
  }

  .receipt-terms-box {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .terms-list li {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* Receipt Styles */
.receipt-sheet {
  background: #ffffff;
  box-sizing: border-box;
}
.receipt-terms-box {
  background: #ffffff;
  border: 1.5px solid #050e1d;
  border-radius: 8px;
}
.terms-list li {
  line-height: 1.35;
}

/* Table Hover */
.table-row-hover:hover {
  background-color: #f8fafc;
}
