/* Easy Parwaz Travel & Tours - Custom Styles & Print Stylesheet */

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

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-luxury: 'Playfair Display', Georgia, serif;
  --font-serif-header: 'Cinzel', 'Playfair Display', Georgia, serif;
}

body {
  font-family: var(--font-main);
  background-color: #0b0f19;
  color: #f1f5f9;
  overflow-x: hidden;
}

code, .font-mono {
  font-family: var(--font-mono);
}

.font-luxury {
  font-family: var(--font-luxury);
}

.font-serif-header {
  font-family: var(--font-serif-header);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: all 0.2s ease-in-out;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

/* Subtle Glows */
.glow-primary {
  box-shadow: 0 0 25px -5px rgba(56, 189, 248, 0.2);
}

.glow-indigo {
  box-shadow: 0 0 25px -5px rgba(99, 102, 241, 0.25);
}

.glow-emerald {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.2);
}

/* Status Pulse Animation */
@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

/* Modal Dialog Transitions */
dialog {
  display: none;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
}

dialog[open] {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

dialog::backdrop {
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Luxury Voucher Sheet Container (On-Screen & Print) */
.luxury-voucher-sheet,
.client-invoice-sheet {
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: all 0.2s ease;
}

/* Hotel Dedicated Voucher Page (Screen Preview) */
.hotel-voucher-page {
  background-color: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Visual Page Divider Badge for Multi-Hotel Preview */
.hotel-voucher-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 1.5rem 0 1rem 0;
}
.hotel-voucher-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.4), transparent);
}
.hotel-voucher-divider-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Voucher Agency Logo */
.voucher-logo {
  max-height: 60px;
  max-width: 240px;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Voucher Authorized Signature Image */
.voucher-signature-img {
  max-height: 70px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Quotation Authorized Signatory & Official Stamp */
.quotation-footer-signatures {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.quotation-notice {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

.authorized-signatory-box {
  display: inline-block;
  text-align: center;
}

.signature-stamp-wrapper {
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signature-stamp-img {
  max-height: 75px;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.signature-line {
  width: 180px;
  margin: 0 auto;
  border-bottom: 1.5px solid #0f172a;
}

/* Print Optimization for Luxury Voucher & Client Invoice (Standard A4 Format) */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .signature-stamp-img,
  .voucher-signature-img {
    max-height: 75px !important;
    width: auto !important;
    object-fit: contain !important;
    mix-blend-mode: multiply !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .quotation-footer-signatures {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 1.5rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid #cbd5e1 !important;
    display: block !important;
  }

  .quotation-notice {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 9.5pt;
    line-height: 1.35;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide all dashboard chrome and UI elements during printing */
  header, 
  nav, 
  main,
  #dashboard-view, 
  #toast-container,
  dialog:not(#voucher-dialog):not(#client-invoice-dialog):not(#quotation-print-modal):not(#quotation-preview-dialog),
  .no-print,
  #invoice-currency-switcher,
  button,
  .print-hide {
    display: none !important;
  }

  #voucher-dialog,
  #client-invoice-dialog,
  #quotation-print-modal,
  #quotation-preview-dialog {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #voucher-dialog > div,
  #client-invoice-dialog > div,
  #quotation-print-modal > div,
  #quotation-preview-dialog > div {
    max-height: none !important;
    overflow: visible !important;
  }

  #voucher-dialog::backdrop,
  #client-invoice-dialog::backdrop {
    display: none !important;
  }

  #voucher-content-area,
  #client-invoice-content-area {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border: none !important;
    overflow: visible !important;
    display: block !important;
  }

  .luxury-voucher-sheet,
  .client-invoice-sheet {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .print-voucher-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #0f172a !important;
    page-break-inside: avoid;
    break-inside: avoid;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
  }

  .print-text-dark {
    color: #0f172a !important;
  }

  .print-text-muted {
    color: #475569 !important;
  }

  .print-border {
    border-color: #e2e8f0 !important;
  }

  .print-badge {
    border: 1px solid #c5a880 !important;
    color: #0f172a !important;
    background: #fdfbf7 !important;
  }

  /* Client Invoice Bank Settlement Print Optimization */
  #invoice-bank-settlement-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    border-radius: 8px !important;
  }
  #invoice-bank-settlement-card * {
    color: inherit;
  }

  .voucher-logo {
    max-height: 60px !important;
    max-width: 240px !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Dedicated Hotel Voucher Print Page Break & A4 Vertical Layout */
  .hotel-voucher-page {
    page-break-after: always !important;
    break-after: page !important;
    box-sizing: border-box !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 2.5rem !important;
    padding-bottom: 0 !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .hotel-voucher-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .hotel-voucher-divider {
    display: none !important;
  }
}

/* Toggle Switch Styles */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .25s ease;
  border-radius: 24px;
  border: 1px solid #475569;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #f8fafc;
  transition: .25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

input:checked + .switch-slider {
  background-color: #0284c7;
  border-color: #38bdf8;
}

input:focus + .switch-slider {
  box-shadow: 0 0 1px #0284c7;
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

/* Glow for Pending Operations */
.glow-warning {
  box-shadow: 0 0 20px -3px rgba(245, 158, 11, 0.35);
}

.pulse-warning {
  animation: pulse-amber 2s infinite ease-in-out;
}

@keyframes pulse-amber {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

/* ========================================================================= */
/* ROLE-BASED VISIBILITY & FINANCIAL ENGINE STYLES (RBAC)                    */
/* ========================================================================= */
#login-lock-overlay {
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

#login-lock-overlay.hidden,
#login-lock-overlay.d-none {
  display: none !important;
}

.d-none {
  display: none !important;
}

#login-error-alert:not(.hidden):not(.d-none) {
  display: flex !important;
}

body.rbac-sales-agent .rbac-admin-only,
body.rbac-operations .rbac-admin-only,
body.rbac-secretary .rbac-admin-only,
body.staff-mode .rbac-admin-only,
body.rbac-sales-agent .admin-only-finance,
body.rbac-operations .admin-only-finance,
body.rbac-secretary .admin-only-finance,
body.staff-mode .admin-only-finance,
body.rbac-sales-agent .cost-sensitive,
body.rbac-operations .cost-sensitive,
body.rbac-secretary .cost-sensitive,
body.staff-mode .cost-sensitive,
body.rbac-operations #nav-tab-finance,
body.rbac-secretary #nav-tab-finance,
body.rbac-operations #nav-tab-treasury,
body.rbac-secretary #nav-tab-treasury,
body.rbac-operations #nav-tab-settings,
body.rbac-secretary #nav-tab-settings,
body.staff-mode #nav-tab-finance,
body.staff-mode #nav-tab-treasury,
body.staff-mode #nav-tab-settings {
  display: none !important;
}

/* Master Directories RBAC Gating: Sales_Agent strictly locked out of Suppliers & Customers Directories */
body.rbac-sales-agent #nav-tab-suppliers,
body.rbac-sales-agent #nav-tab-customers,
body.rbac-sales-agent #btn-top-open-customers,
body.rbac-sales-agent #btn-top-customers,
body.rbac-operations #nav-tab-customers,
body.rbac-secretary #nav-tab-customers,
body.rbac-operations #btn-top-open-customers,
body.rbac-secretary #btn-top-open-customers,
body.rbac-operations #btn-top-customers,
body.rbac-secretary #btn-top-customers,
body.rbac-sales-agent .btn-customers-vault-nav,
body.rbac-operations .btn-customers-vault-nav,
body.rbac-secretary .btn-customers-vault-nav {
  display: none !important;
}

/* Confidential Supplier Buying Costs & Net Profit Strictly Concealed from Sales_Agent, Operations & Secretary */
body.rbac-sales-agent .summary-costs,
body.rbac-sales-agent .summary-profit,
body.rbac-operations .summary-profit,
body.rbac-secretary .summary-profit,
body.staff-mode .summary-profit,
body.rbac-sales-agent .summary-margin,
body.rbac-operations .summary-margin,
body.rbac-secretary .summary-margin,
body.staff-mode .summary-margin,
body.rbac-sales-agent #summary-supplier-payables,
body.rbac-sales-agent #summary-net-profit,
body.rbac-operations #summary-net-profit,
body.rbac-secretary #summary-net-profit,
body.staff-mode #summary-net-profit,
body.rbac-sales-agent #summary-margin-pct,
body.rbac-operations #summary-margin-pct,
body.rbac-secretary #summary-margin-pct,
body.staff-mode #summary-margin-pct,
body.rbac-sales-agent #summary-profit-pax,
body.rbac-operations #summary-profit-pax,
body.rbac-secretary #summary-profit-pax,
body.staff-mode #summary-profit-pax,
body.rbac-operations #fin-kpi-profit,
body.rbac-secretary #fin-kpi-profit,
body.rbac-operations #fin-kpi-net-margin-badge,
body.rbac-secretary #fin-kpi-net-margin-badge,
body.rbac-sales-agent .input-hotel-cost,
body.rbac-sales-agent .input-flight-cost,
body.rbac-sales-agent .input-transport-cost,
body.rbac-sales-agent .input-visa-cost,
body.rbac-sales-agent .flight-cost-input,
body.rbac-sales-agent .hotel-cost-input,
body.rbac-sales-agent .transport-cost-input,
body.rbac-sales-agent .visa-cost-input,
body.rbac-sales-agent #booking-modal .flight-rate-input,
body.rbac-sales-agent #booking-modal .hotel-rate-input,
body.rbac-sales-agent .transport-rate-input,
body.rbac-sales-agent .visa-rate-input,
body.rbac-sales-agent .flight-base-cost-display,
body.rbac-sales-agent .hotel-base-cost-display,
body.rbac-sales-agent .transport-base-cost-display,
body.rbac-sales-agent .visa-base-cost-display,
body.rbac-sales-agent .supplier-cost-section {
  display: none !important;
}

/* Modal Profit Engine Bar Layout for Staff (Clean 1-column layout for Total Invoiced) */
body.rbac-sales-agent #modal-profit-engine-bar .grid,
body.rbac-operations #modal-profit-engine-bar .grid,
body.rbac-secretary #modal-profit-engine-bar .grid,
body.staff-mode #modal-profit-engine-bar .grid {
  grid-template-columns: 1fr !important;
}
@media (min-width: 640px) {
  body.rbac-sales-agent #modal-profit-engine-bar .grid,
  body.rbac-operations #modal-profit-engine-bar .grid,
  body.rbac-secretary #modal-profit-engine-bar .grid,
  body.staff-mode #modal-profit-engine-bar .grid {
    grid-template-columns: minmax(240px, 320px) !important;
  }
}

body.rbac-sales-agent .form-step-tab[data-form-step="6"],
body.rbac-operations .form-step-tab[data-form-step="6"],
body.rbac-secretary .form-step-tab[data-form-step="6"],
body.staff-mode .form-step-tab[data-form-step="6"] {
  display: none !important;
}

/* ========================================================================= */
/* OPERATIONS ACTION HUB & ACTION DESK STYLING                               */
/* ========================================================================= */
.operations-action-hub-bar {
  background: linear-gradient(135deg, #0b1329 0%, #0f172a 100%) !important;
  border-color: rgba(51, 65, 85, 0.7) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#action-hub-filter-pills .filter-pill,
#dedicated-filter-pills .filter-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: #cbd5e1;
}

#action-hub-filter-pills .filter-pill:hover,
#dedicated-filter-pills .filter-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#action-hub-filter-pills .filter-pill.active,
#dedicated-filter-pills .filter-pill.active {
  background: #38bdf8 !important;
  border-color: #38bdf8 !important;
  color: #04111d !important;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

#action-hub-filter-pills .filter-pill.active .badge,
#dedicated-filter-pills .filter-pill.active .badge {
  background: #04111d !important;
  color: #38bdf8 !important;
}

.btn-outline-purple {
  border-color: #a855f7 !important;
  color: #c084fc !important;
}
.btn-outline-purple:hover {
  background-color: #9333ea !important;
  color: #ffffff !important;
}

/* Action Hub Cards */
.action-hub-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.action-hub-card h4,
.action-hub-card h6,
.action-hub-card .note-text,
.action-hub-card .note-title,
.action-card-notes .note-title {
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  white-space: pre-wrap !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.action-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
}

.action-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.action-card-receivables::before { background: #f59e0b; }
.action-card-payables::before { background: #ef4444; }
.action-card-hcn::before { background: #06b6d4; }
.action-card-pnr::before { background: #3b82f6; }
.action-card-visas::before { background: #10b981; }
.action-card-quotes::before { background: #e2e8f0; }
.action-card-notes::before { background: #8b5cf6; }

.action-card-receivables:hover { border-color: rgba(245, 158, 11, 0.5); }
.action-card-payables:hover { border-color: rgba(239, 68, 68, 0.5); }
.action-card-hcn:hover { border-color: rgba(6, 182, 212, 0.5); }
.action-card-pnr:hover { border-color: rgba(59, 130, 246, 0.5); }
.action-card-visas:hover { border-color: rgba(16, 185, 129, 0.5); }
.action-card-quotes:hover { border-color: rgba(226, 232, 240, 0.5); }
.action-card-notes:hover { border-color: rgba(139, 92, 246, 0.5); }

/* Completed Note Card State */
.action-card-notes.note-completed {
  opacity: 0.65;
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(51, 65, 85, 0.4);
}

.action-card-notes.note-completed .note-title {
  text-decoration: line-through;
  color: #94a3b8;
}

/* Dense Table View for Action Hub */
#action-hub-table tbody tr {
  transition: background-color 0.15s ease;
}
#action-hub-table tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.6);
}
#action-hub-table td {
  vertical-align: middle;
}
.action-view-btn.active {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.rbac-sales-agent .step-arrow-6,
body.rbac-operations .step-arrow-6,
body.staff-mode .step-arrow-6 {
  display: none !important;
}

body.staff-mode #badge-finance-lock,
body.rbac-sales-agent #badge-finance-lock,
body.rbac-operations #badge-finance-lock {
  display: inline-block !important;
}

/* Profit Meter Bar Transition */
#pe-margin-bar {
  transition: width 0.35s ease, background-color 0.35s ease;
}

/* Finance Ledger Table Highlights */
.profit-badge-pos {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.profit-badge-neg {
  background-color: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.status-badge-paid {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-badge-partial {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-badge-pending {
  background-color: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* ========================================================================= */
/* DYNAMIC SERVICE REPEATERS & SUPPLIERS DIRECTORY STYLES                    */
/* ========================================================================= */

.repeater-card {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.875rem;
  padding: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.repeater-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.5);
}

.repeater-header-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
}

/* Supplier Category Pill Badges */
.badge-cat-hotel {
  background-color: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cat-flight {
  background-color: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-cat-transport {
  background-color: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-cat-visa {
  background-color: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-cat-excursion {
  background-color: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Room Nights Calculation Badge */
.room-nights-pill {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* Animation for Adding Repeaters */
@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.repeater-card-animate {
  animation: slideDownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================================= */
/* MOBILE-FIRST PWA, HIGH-DPI RETINA & TOUCH TARGET ENGINE (MAX-WIDTH: 768px)*/
/* ========================================================================= */

/* Safe Area Inset Support for Modern iOS / Android Devices */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative;
}

body {
  padding-top: var(--sat);
  padding-bottom: var(--sab);
  padding-left: var(--sal);
  padding-right: var(--sar);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

main {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Touch-Scrollable Horizontal Row for Tabs & Filter Pills */
.touch-scroll-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.touch-scroll-row::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Ensure all vector SVGs render at maximum pixel fidelity */
svg, [data-lucide] {
  shape-rendering: geometricPrecision;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  /* 1. Touch Target Optimization (>= 44px) */
  button,
  .btn,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="tel"],
  input[type="search"],
  select {
    min-height: 44px;
    font-size: 14px !important; /* Prevents auto-zoom on iOS Safari */
  }

  /* Compact icon buttons get touch-target expansion */
  button.p-1,
  button.p-1.5,
  button.p-2,
  .touch-target-expand {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .form-step-tab,
  .sup-category-pill,
  .payable-filter-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* 2. Mobile Responsive Table-to-Card Engine */
  /* Hide desktop table headers */
  #table-view-wrapper thead,
  #view-finance thead,
  #view-finance-container thead,
  #view-suppliers thead,
  #view-suppliers-container thead,
  #view-customers thead,
  #view-customers-container thead,
  #payables-drilldown-dialog thead,
  #supplier-profile-dialog thead,
  #customer-profile-dialog thead {
    display: none !important;
  }

  /* Table structure transforms to vertical flow */
  #bookings-table-body,
  #finance-table-body,
  #suppliers-table-body,
  #customers-table-body,
  #payables-table-body,
  #supplier-bookings-table-body,
  #customer-bookings-table-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.875rem !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Each table row becomes a stacked card */
  #bookings-table-body tr,
  #finance-table-body tr,
  #suppliers-table-body tr,
  #customers-table-body tr,
  #payables-table-body tr,
  #supplier-bookings-table-body tr,
  #customer-bookings-table-body tr {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(51, 65, 85, 0.7) !important;
    border-radius: 1rem !important;
    padding: 1rem !important;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.35) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Table cells inside card */
  #bookings-table-body td,
  #finance-table-body td,
  #suppliers-table-body td,
  #customers-table-body td,
  #payables-table-body td,
  #supplier-bookings-table-body td,
  #customer-bookings-table-body td {
    display: block !important;
    padding: 0.25rem 0 !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Last table cell (Actions) sticky to bottom of card with full-width wrapping button grid */
  #bookings-table-body td:last-child,
  #finance-table-body td:last-child,
  #suppliers-table-body td:last-child,
  #customers-table-body td:last-child,
  #payables-table-body td:last-child,
  #supplier-bookings-table-body td:last-child,
  #customer-bookings-table-body td:last-child {
    border-top: 1px solid rgba(51, 65, 85, 0.6) !important;
    padding-top: 0.75rem !important;
    margin-top: 0.35rem !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #bookings-table-body td:last-child > div,
  #finance-table-body td:last-child > div,
  #suppliers-table-body td:last-child > div,
  #customers-table-body td:last-child > div,
  #payables-table-body td:last-child > div,
  #supplier-bookings-table-body td:last-child > div,
  #customer-bookings-table-body td:last-child > div {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0.5rem !important;
    justify-content: stretch !important;
    box-sizing: border-box !important;
  }

  #bookings-table-body td:last-child button,
  #finance-table-body td:last-child button,
  #suppliers-table-body td:last-child button,
  #customers-table-body td:last-child button,
  #payables-table-body td:last-child button,
  #supplier-bookings-table-body td:last-child button,
  #customer-bookings-table-body td:last-child button {
    flex: 1 1 calc(50% - 0.25rem) !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0.5rem !important;
    font-size: 0.8rem !important;
  }

  /* Allow touch swipe on horizontal scrolling containers */
  .overflow-x-auto {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  /* Grid view cards action layout */
  #grid-view-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #grid-view-wrapper .glass-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  #grid-view-wrapper .glass-card > div:last-child {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #grid-view-wrapper .glass-card > div:last-child button {
    min-height: 44px !important;
  }

  /* Main Container Mobile Insets */
  main {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 1rem !important;
  }

  /* 3. Mobile Dialog & Modal Full-Screen / Bottom Sheet Optimization */
  dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  dialog > div {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100% !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  dialog .custom-scrollbar,
  dialog .overflow-y-auto {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  /* Ensure modal header & footer stay accessible */
  dialog .rounded-t-2xl {
    border-radius: 0 !important;
    padding-top: max(1rem, var(--sat)) !important;
    flex-shrink: 0 !important;
  }
  dialog .rounded-b-2xl {
    border-radius: 0 !important;
    padding-bottom: max(1rem, var(--sab)) !important;
    flex-shrink: 0 !important;
  }

  /* 4. Top Navigation Bar Mobile Comfort & Horizontal Swiping Action Controls */
  header {
    padding-left: max(0.75rem, var(--sal));
    padding-right: max(0.75rem, var(--sar));
  }

  #header-main-bar {
    gap: 8px !important;
  }

  #brand-logo-container {
    order: 1 !important;
    flex-shrink: 0 !important;
  }

  #header-action-controls {
    order: 2 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    max-width: 100% !important;
    gap: 8px !important;
  }

  #header-action-controls::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  #header-action-controls > *,
  #header-action-controls button,
  #header-action-controls div {
    flex-shrink: 0 !important;
  }

  /* Mobile Flex Re-Ordering: Priority buttons immediately visible */
  #btn-open-create-modal {
    order: 2 !important;
    flex-shrink: 0 !important;
  }

  #btn-toggle-role {
    order: 3 !important;
    flex-shrink: 0 !important;
  }

  #btn-sync-sheets {
    order: 4 !important;
    flex-shrink: 0 !important;
  }

  #btn-open-google-settings {
    order: 5 !important;
    flex-shrink: 0 !important;
  }

  #btn-open-voucher-generator {
    order: 6 !important;
    flex-shrink: 0 !important;
  }

  #btn-export-csv {
    order: 7 !important;
    flex-shrink: 0 !important;
  }

  #btn-sample-data {
    order: 8 !important;
    flex-shrink: 0 !important;
  }

  #btn-install-app {
    order: 9 !important;
    flex-shrink: 0 !important;
  }

  #header-live-time-wrapper {
    order: 10 !important;
    flex-shrink: 0 !important;
    display: flex !important;
  }
}

/* 5. Mobile Floating Action Button (FAB) */
#fab-add-booking {
  position: fixed !important;
  bottom: calc(20px + var(--sab)) !important;
  right: 20px !important;
  z-index: 999 !important;
  box-shadow: 0 10px 25px -3px rgba(14, 165, 233, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3) !important;
}

@media (min-width: 640px) {
  #fab-add-booking {
    display: none !important;
  }
}

/* Customer VIP Badges */
.badge-vip-frequent {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.badge-vip-repeat {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.badge-vip-standard {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Customer & Supplier Mobile Stacked Cards */
@media (max-width: 768px) {
  .customer-mobile-card, .supplier-mobile-card, .passport-mobile-card {
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.5);
    margin-bottom: 0.75rem;
  }
}

/* Passport Status & Birthday Badges */
.badge-passport-valid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-passport-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-passport-expired {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.badge-birthday-today {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.5);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.badge-birthday-upcoming {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* ========================================================================= */
/* EASY PARWAZ AI COPILOT (GEMINI PRO) STYLES                                */
/* ========================================================================= */

/* Quick Prompt Pills */
.copilot-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(51, 65, 85, 0.8);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.copilot-pill:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.copilot-pill:active {
  transform: scale(0.96);
}

/* User Message Bubble */
.copilot-msg-user {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.copilot-msg-user > div {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 1rem 1rem 0.25rem 1rem;
  padding: 0.75rem 1rem;
  max-width: 85%;
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  word-break: break-word;
}

/* AI Message Bubble */
.copilot-msg-ai {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 95%;
}

.copilot-msg-ai-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 1rem 1rem 1rem 0.25rem;
  padding: 1rem;
  color: #e2e8f0;
  font-size: 0.8125rem;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  word-break: break-word;
}

.copilot-msg-ai-content p {
  margin-bottom: 0.5rem;
}

.copilot-msg-ai-content p:last-child {
  margin-bottom: 0;
}

.copilot-msg-ai-content strong {
  color: #f8fafc;
  font-weight: 600;
}

.copilot-msg-ai-content ul, .copilot-msg-ai-content ol {
  margin: 0.5rem 0 0.5rem 1.25rem;
  list-style-type: disc;
}

.copilot-msg-ai-content li {
  margin-bottom: 0.25rem;
}

.copilot-msg-ai-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  background: rgba(30, 41, 59, 0.9);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  color: #f59e0b;
}

.copilot-msg-ai-content table {
  width: 100%;
  margin: 0.75rem 0;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.copilot-msg-ai-content th, .copilot-msg-ai-content td {
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  text-align: left;
}

.copilot-msg-ai-content th {
  background: rgba(30, 41, 59, 0.7);
  color: #94a3b8;
  font-weight: 600;
}

/* Two-Stage Action Confirmation Cards */
.copilot-action-card {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 1rem;
  border-radius: 0.875rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12);
  transition: all 0.2s ease;
}

.copilot-action-card.confirmed {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

.copilot-action-card.cancelled {
  border-color: rgba(100, 116, 139, 0.4);
  opacity: 0.7;
}

.copilot-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.copilot-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  font-size: 0.75rem;
}

.copilot-action-item {
  background: rgba(2, 6, 23, 0.6);
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.copilot-action-item .label {
  font-size: 0.6875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  display: block;
}

.copilot-action-item .val {
  font-weight: 600;
  color: #f8fafc;
  margin-top: 0.1rem;
  display: block;
}

/* Voice Dictation Animated Recording Pulse */
.copilot-mic-recording {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  animation: pulse-red-glow 1.5s infinite;
}

@keyframes pulse-red-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* 1-Click Monthly & Fiscal Year Period Filter Pills */
.period-pill,
.finance-period-pill {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.period-pill.active,
.finance-period-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
}

/* Category Badge Styling for OPEX Expenses */
.expense-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  border-width: 1px;
}

/* Customer Modal & Quick Add Trigger */
#customer-dialog::backdrop {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
}

#btn-quick-add-customer:hover {
  transform: translateY(-1px);
}

/* =========================================================================
   ENLARGED & BEAUTIFIED OPERATIONAL NOTES & ACTION HUB MODALS
   ========================================================================= */

/* Ensure modal dialog is wide and readable without text clipping */
#dialog-quick-action-note,
#modal-manual-note,
.modal-manual-note {
  max-width: 740px !important;
  width: 95% !important;
  border-radius: 18px !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 25px rgba(168, 85, 247, 0.15) !important;
}

#dialog-quick-action-note textarea#note-inp-title,
#modal-manual-note textarea#manual-note-title,
#modal-manual-note textarea {
  min-height: 110px !important;
  font-size: 0.925rem !important;
  line-height: 1.5 !important;
  resize: vertical !important;
  color: #f8fafc !important;
}

/* Fix truncated inputs and select dropdowns */
#dialog-quick-action-note select,
#dialog-quick-action-note input,
#modal-manual-note select,
#modal-manual-note input {
  min-height: 44px !important;
  font-size: 0.875rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dialog-quick-action-note select option,
#modal-manual-note select option {
  background: #090d16 !important;
  color: #f1f5f9 !important;
  padding: 8px !important;
}

#dialog-quick-action-note label,
#modal-manual-note .form-label {
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  color: #94a3b8 !important;
}

/* Partial Payment Dialog Styling */
#dialog-partial-payment,
#modal-partial-payment,
.modal-partial-payment {
  min-width: min(580px, 95vw) !important;
  max-width: 640px !important;
  width: 95% !important;
  border-radius: 20px !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 25px rgba(16, 185, 129, 0.15) !important;
}

#dialog-partial-payment select,
#dialog-partial-payment input {
  min-height: 44px !important;
}

/* Sleek Quotation & Payables Action Buttons */
.btn-quote-calc {
  background-color: transparent !important;
  border: 1px solid #475569 !important;
  color: #cbd5e1 !important;
}
.btn-quote-calc:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}
.btn-quote-won {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}
.btn-quote-won:hover {
  background-color: #10b981 !important;
  color: #ffffff !important;
}
.btn-quote-lost {
  background-color: rgba(244, 63, 94, 0.12) !important;
  border: 1px solid rgba(244, 63, 94, 0.35) !important;
  color: #fb7185 !important;
}
.btn-quote-lost:hover {
  background-color: #f43f5e !important;
  color: #ffffff !important;
}

/* ========================================================================= */
/* DAILY ACTION DESK COMPONENT STYLES & BOOTSTRAP ADAPTER UTILITIES         */
/* ========================================================================= */
.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.pe-3 { padding-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.w-100 { width: 100% !important; }
.flex-fill { flex: 1 1 auto !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-muted { color: #94a3b8 !important; }
.text-light { color: #f1f5f9 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-monospace { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important; }
.border-secondary { border-color: #334155 !important; }
.rounded-3 { border-radius: 0.75rem !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: all 0.15s ease-in-out;
}
.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
}
.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
}
.btn-dark {
  color: #f1f5f9;
  background-color: #1e293b;
  border-color: #334155;
}
.btn-dark:hover, .btn-dark.active {
  background-color: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}
.btn-primary {
  color: #fff;
  background-color: #0284c7;
  border-color: #0284c7;
}
.btn-primary:hover {
  background-color: #0369a1;
}
.btn-success {
  color: #fff;
  background-color: #16a34a;
  border-color: #16a34a;
}
.btn-success:hover {
  background-color: #15803d;
}
.btn-warning {
  color: #000;
  background-color: #f59e0b;
  border-color: #f59e0b;
}
.btn-warning:hover {
  background-color: #d97706;
}
.btn-danger {
  color: #fff;
  background-color: #e11d48;
  border-color: #e11d48;
}
.btn-danger:hover {
  background-color: #be123c;
}
.btn-info {
  color: #000;
  background-color: #06b6d4;
  border-color: #06b6d4;
}
.btn-outline-secondary {
  color: #94a3b8;
  border-color: #475569;
  background: transparent;
}
.btn-outline-secondary:hover {
  color: #fff;
  background: #334155;
}
.btn-outline-warning {
  color: #fbbf24;
  border-color: #d97706;
  background: transparent;
}
.btn-outline-warning:hover, .btn-outline-warning.active {
  color: #000;
  background-color: #fbbf24;
}
.btn-outline-danger {
  color: #fb7185;
  border-color: #e11d48;
  background: transparent;
}
.btn-outline-danger:hover, .btn-outline-danger.active {
  color: #fff;
  background-color: #e11d48;
}
.btn-outline-info {
  color: #38bdf8;
  border-color: #0284c7;
  background: transparent;
}
.btn-outline-info:hover, .btn-outline-info.active {
  color: #000;
  background-color: #38bdf8;
}
.btn-outline-primary {
  color: #60a5fa;
  border-color: #2563eb;
  background: transparent;
}
.btn-outline-primary:hover, .btn-outline-primary.active {
  color: #fff;
  background-color: #2563eb;
}
.btn-outline-success {
  color: #4ade80;
  border-color: #16a34a;
  background: transparent;
}
.btn-outline-success:hover, .btn-outline-success.active {
  color: #fff;
  background-color: #16a34a;
}
.btn-outline-light {
  color: #cbd5e1;
  border-color: #64748b;
  background: transparent;
}
.btn-outline-light:hover, .btn-outline-light.active {
  color: #000;
  background-color: #e2e8f0;
}
.btn-group {
  display: inline-flex;
  border-radius: 0.5rem;
  overflow: hidden;
}
.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}
.badge.bg-secondary { background-color: #475569 !important; color: #fff !important; }
.badge.bg-warning { background-color: #eab308 !important; }
.badge.bg-danger { background-color: #e11d48 !important; color: #fff !important; }
.badge.bg-info { background-color: #06b6d4 !important; }
.badge.bg-primary { background-color: #2563eb !important; color: #fff !important; }
.badge.bg-success { background-color: #16a34a !important; color: #fff !important; }
.badge.bg-light { background-color: #f1f5f9 !important; color: #0f172a !important; }
.badge.bg-dark { background-color: #0f172a !important; color: #94a3b8 !important; }

#action-hub-grid.d-none,
#action-hub-grid.hidden,
#action-hub-grid[hidden],
#action-hub-grid[style*="display: none"],
#action-hub-table-wrapper.d-none,
#action-hub-table-wrapper.hidden,
#action-hub-table-wrapper[hidden],
#action-hub-table-wrapper[style*="display: none"] {
  display: none !important;
}

#action-hub-grid.row:not(.d-none):not(.hidden) {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
  row-gap: 1rem;
}
#action-hub-grid .col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
@media (min-width: 768px) {
  #action-hub-grid .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
@media (min-width: 1200px) {
  #action-hub-grid .col-xl-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-clip: border-box;
}
.card-body {
  flex: 1 1 auto;
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  margin-bottom: 0;
  vertical-align: middle;
}
.table-dark {
  background-color: #0f172a;
  color: #f1f5f9;
}
.table-hover > tbody > tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.375rem;
}
.form-control-sm {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
}

/* Rate & Cost Comparison Module */
.channel-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.channel-card.lowest-rate-highlight {
  border-color: #10b981 !important;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 25px -4px rgba(16, 185, 129, 0.35), 0 0 10px rgba(16, 185, 129, 0.2) !important;
  transform: translateY(-2px);
}

.channel-card.lowest-rate-highlight .supplier-rate-input {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
  color: #34d399 !important;
  font-weight: 700;
}

.channel-card.lowest-rate-highlight .channel-best-badge {
  display: inline-flex !important;
}

.channel-card .channel-best-badge {
  display: none;
}

.add-channel-btn, #hotel-add-channel-card, #flight-add-channel-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.add-channel-btn:hover, #hotel-add-channel-card:hover, #flight-add-channel-card:hover {
  transform: translateY(-2px);
}

.btn-remove-supplier {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  line-height: 1;
}

.btn-remove-supplier:hover {
  transform: scale(1.2);
}

/* Ensure Comparison Module inputs & Add Supplier controls are ALWAYS visible for ALL roles (Admin, Sales Agents & Staff) */
#view-comparison .hotel-rate-input,
#view-comparison .flight-rate-input,
#view-comparison .supplier-rate-input,
body.rbac-sales-agent #view-comparison .hotel-rate-input,
body.rbac-sales-agent #view-comparison .flight-rate-input,
body.rbac-sales-agent #view-comparison .supplier-rate-input,
body.staff-mode #view-comparison .hotel-rate-input,
body.staff-mode #view-comparison .flight-rate-input,
body.staff-mode #view-comparison .supplier-rate-input {
  display: block !important;
}

#nav-tab-comparison,
body.rbac-sales-agent #nav-tab-comparison,
body.staff-mode #nav-tab-comparison {
  display: inline-flex !important;
}

/* ========================================================================== */
/* Action Desk Notes Module: Assignee Badges & Sub-filter Styling            */
/* ========================================================================== */
.badge-assignee-owner {
  background: rgba(124, 58, 237, 0.18) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  letter-spacing: 0.01em !important;
}

.badge-assignee-samiq {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  letter-spacing: 0.01em !important;
}

.badge-assignee-dua {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  letter-spacing: 0.01em !important;
}

.notes-subfilter-pill {
  transition: all 0.2s ease-in-out !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.notes-subfilter-pill:hover {
  transform: translateY(-1px) !important;
}

.notes-subfilter-pill.active {
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4) !important;
}


