/* css/custom.css */
/* Premium Custom Style Overrides for SHV Cracker (Light Theme + Purple Accents) */

/* Glass panel background */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
}

/* Glow Cards hover animations */
.glow-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
}

/* Glowing buttons (Purple/Indigo Theme) */
.glow-button {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  box-shadow: 0 4px 18px 0 rgba(124, 58, 237, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(124, 58, 237, 0.45);
  opacity: 0.95;
}

/* Secondary Button (Pink/Magenta accent) */
.accent-button {
  background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
  box-shadow: 0 4px 18px 0 rgba(236, 72, 153, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accent-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(236, 72, 153, 0.45);
  opacity: 0.95;
}

/* Indigo buttons for super admin theme */
.indigo-glow-button {
  background: linear-gradient(135deg, #6610f2 0%, #e83e8c 100%);
  box-shadow: 0 4px 18px 0 rgba(102, 16, 242, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indigo-glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(102, 16, 242, 0.45);
  opacity: 0.95;
}

/* Brand gradient text */
.brand-text-gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom fade animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom pulsing glow */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #2E134E;
}
::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
}

/* Floating Sidebar styles */
.floating-sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(46,19,78,0.85);
  padding: 12px 8px;
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(124,58,237,0.4);
  backdrop-filter: blur(12px);
}
.floating-sidebar.left {
  left: 15px;
}
.floating-sidebar.right {
  right: 15px;
}
.floating-sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.2s ease-in-out;
}
.floating-sidebar-icon:hover {
  transform: scale(1.1);
}

/* Auto hide placeholder on focus globally across the entire project */
input:focus::placeholder,
textarea:focus::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

/* ════════════════════════════════════════════════════════
   INVOICE STYLING (WHITE BACKGROUND & DARK TEXTS)
   ════════════════════════════════════════════════════════ */
.inv-card {
  background: #fff;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.03);
}
.inv-head {
  background: #7e22ce; /* Matches the brand purple in the 3rd image */
  color: #ffffff;
  padding: 28px 28px 22px;
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 20px;
  position: relative;
  border-bottom: none;
}
.inv-head .co-name {
  font-size: 20px; font-weight: 900;
  letter-spacing: -.02em; margin: 0 0 3px; line-height: 1;
  color: #ffffff;
}
.inv-head .co-sub {
  font-size: 10px; font-weight: 700; color: #e9d5ff;
  text-transform: uppercase; letter-spacing: .1em;
}
.inv-head .co-detail {
  margin-top: 10px; font-size: 10px; color: #f3e8ff; line-height: 1.7;
}
.inv-head .co-detail strong {
  color: #ffffff;
}
.inv-meta { text-align: right; }
.inv-meta .inv-id {
  font-size: 20px; font-weight: 900;
  font-family: monospace; line-height: 1;
  color: #ffffff;
}
.inv-meta .inv-date { font-size: 11px; color: #f3e8ff; margin-top: 5px; }
.inv-meta .inv-badge {
  display: inline-block; margin-top: 8px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  background: #6b21a8;
  border: 1px solid #a855f7;
  color: #ffffff;
}

/* Status row */
.inv-status-row {
  display: flex; gap: 10px;
  padding: 13px 28px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap; align-items: center;
}
.schip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  border: 1px solid;
}
.schip-purple { background:#faf5ff; color:#7e22ce; border-color:#e9d5ff; }
.schip-mid    { background:#f8fafc; color:#475569; border-color:#cbd5e1; }
.schip-light  { background:#f8fafc; color:#64748b; border-color:#e2e8f0; }
.schip-dot { width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0; }

/* Parties */
.inv-parties {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e2e8f0;
}
.inv-party { padding: 20px 28px; }
.inv-party:first-child { border-right: 1px solid #e2e8f0; }
.inv-party-lbl {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em;
  color: #64748b; margin-bottom: 8px;
}
.inv-party-name {
  font-size: 15px; font-weight: 900; color: #0f172a; margin-bottom: 4px;
}
.inv-party-detail {
  font-size: 11px; color: #475569; font-weight: 600; line-height: 1.7;
}
.inv-party-detail span { color: #0f172a; font-weight: 700; }

/* Items table */
.inv-tbl-wrap { padding: 12px 16px; }
.inv-tbl-wrap h4 {
  font-size: 11px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .05em;
  color: #000000; margin: 0 0 8px;
}
table.inv-tbl {
  width: 100%; border-collapse: collapse; font-size: 11px;
  border: 1.5px solid #000000;
}
table.inv-tbl thead tr {
  background: #f8fafc;
  color: #000000;
  border-bottom: 1.5px solid #000000;
}
table.inv-tbl th {
  padding: 6px 8px;
  font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
  color: #000000;
  background: #f8fafc;
  border: 1px solid #000000;
}
table.inv-tbl th:first-child { border-radius: 0; }
table.inv-tbl th:last-child  { border-radius: 0; }
table.inv-tbl tbody tr { background: #ffffff; border-bottom: 1px solid #000000; }
table.inv-tbl tbody tr:hover { background: #f8fafc; }
table.inv-tbl td {
  padding: 6px 8px;
  border: 1px solid #000000;
  color: #000000; font-weight: 600;
}
table.inv-tbl td.num    { text-align: right; font-family: monospace; font-weight: 700; color: #000000; }
table.inv-tbl td.center { text-align: center; }
table.inv-tbl td.name   { font-weight: 700; color: #000000; text-align: left; }
.strike { text-decoration: line-through; color: #64748b; font-size: 10px; }
.disc-pct { color: #000000; font-weight: 800; }

/* Footer grid */
.inv-footer-grid {
  display: flex; justify-content: space-between;
  border-top: none;
  padding: 12px 16px 0;
  gap: 20px;
}
.inv-notes {
  flex: 1; text-align: left;
}
.inv-notes h5 {
  font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .05em;
  color: #000000;
  margin: 0 0 6px;
}
.inv-notes-text {
  font-size: 9.5px; color: #000000; font-weight: 600; line-height: 1.45;
}

.inv-totals { width: 300px; min-width: 280px; text-align: right; }
.trow {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 11px;
  padding: 3px 0; color: #000000; font-weight: 700;
}
.trow .tv { font-family: monospace; font-weight: 700; color: #000000; }
.trow.savings .tv { color: #000000; font-weight: 700; }
.trow.grand {
  margin-top: 6px; padding: 6px 12px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 4px; color: #000000;
  font-size: 12px; font-weight: 900;
  display: flex; justify-content: space-between; align-items: center;
}
.trow.grand .tv { color: #000000; font-size: 13px; font-weight: 900; font-family: monospace; }

/* Footer strip */
.inv-strip {
  display: none !important;
}

/* Off-screen wrapper for rendering printable invoices and PDF generation */
.print-area-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 794px;
  max-width: 794px;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -9999;
}
.print-area-container {
  width: 794px;
  max-width: 794px;
  background: #ffffff;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Page margin setup for clean A4 multi-page document pagination */
@page {
  size: A4 portrait;
  margin: 5mm 5mm;
}

/* Force clean white background, black fonts, table borders, and multi-page flow in print view */
@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    display: block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset all flex/height/overflow constraints from layout containers */
  body,
  body > div,
  body > div > div,
  .flex-grow,
  .flex-1,
  div[class*="min-h-screen"],
  div[class*="h-screen"],
  div[class*="overflow-y-auto"],
  div[class*="overflow-x-auto"],
  main {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
  }

  header, footer, .floating-sidebar, .print\:hidden, select, input, button, #site-top-fixed, #header-spacer, aside, #mobile-menu, #mobile-sticky-checkout-bar, #mobile-cart-modal, #video-player-modal, #image-lightbox, #global-image-lightbox, .ac-sidebar, .ac-banner, .cc-head, .tbl-wrap, .tr-chips, .empty-state, .otbl, .site-footer, #whatsapp-sticky, #call-sticky {
    display: none !important;
  }

  /* Show only print areas */
  .print-area-wrapper {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: auto !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  .print-area-container {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #ffffff !important;
    height: auto !important;
    overflow: visible !important;
  }
  .inv-card {
    border: 1.5px solid #000000 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    box-sizing: border-box !important;
  }
  .inv-head {
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 1px solid #000000 !important;
    padding: 12px 16px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-head .co-name,
  .inv-head .co-sub,
  .inv-head .co-detail,
  .inv-head .co-detail strong,
  .inv-meta .inv-id,
  .inv-meta .inv-date {
    color: #000000 !important;
  }
  .inv-meta .inv-badge {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  .inv-status-row {
    background: #ffffff !important;
    border-bottom: 1px solid #000000 !important;
    padding: 8px 16px !important;
  }
  .schip {
    border: 1px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .inv-parties {
    border-bottom: 1px solid #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-party {
    padding: 10px 16px !important;
  }
  .inv-party:first-child {
    border-right: 1px solid #000000 !important;
  }
  .inv-party-lbl, .inv-party-name, .inv-party-detail, .inv-party-detail span {
    color: #000000 !important;
  }
  .inv-tbl-wrap {
    padding: 10px 16px !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    overflow: visible !important;
  }
  .inv-tbl-wrap h4 {
    color: #000000 !important;
  }
  table.inv-tbl {
    border: 1px solid #000000 !important;
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }
  table.inv-tbl thead {
    display: table-header-group !important;
  }
  table.inv-tbl thead tr {
    background: #f8fafc !important;
  }
  table.inv-tbl th {
    color: #000000 !important;
    background: #f8fafc !important;
    border: 1px solid #000000 !important;
    padding: 4px 6px !important;
  }
  table.inv-tbl tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  table.inv-tbl td {
    color: #000000 !important;
    border: 1px solid #000000 !important;
    padding: 4px 6px !important;
  }
  table.inv-tbl td.name, table.inv-tbl td.num, table.inv-tbl td.center {
    color: #000000 !important;
  }
  .disc-pct {
    color: #000000 !important;
  }
  .strike {
    color: #64748b !important;
  }
  .inv-footer-grid {
    border-top: 1px solid #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-notes {
    border-right: 1px solid #000000 !important;
    padding: 10px 16px !important;
  }
  .inv-notes h5, .inv-notes-text {
    color: #000000 !important;
  }
  .inv-totals {
    padding: 10px 16px !important;
  }
  .trow, .trow .tv, .trow.savings .tv {
    color: #000000 !important;
  }
  .trow.grand {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 8px 12px !important;
  }
  .trow.grand .tv {
    color: #000000 !important;
  }

  .inv-card * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /* Clean font size overrides for laser printer legibility */
  .inv-notes h5 {
    font-size: 11px !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
  }
  .inv-notes-text {
    font-size: 9px !important;
    line-height: 1.35 !important;
  }
  .inv-notes {
    padding: 6px 12px !important;
  }
  .inv-notes div[style*="margin-top:14px"] {
    font-size: 9px !important;
    margin-top: 8px !important;
  }
  .inv-totals {
    padding: 6px 12px !important;
  }
  .trow {
    font-size: 10px !important;
    padding: 2px 0 !important;
  }
  .trow .tv {
    font-size: 11px !important;
  }
  .trow.grand {
    padding: 5px 8px !important;
    border-radius: 4px !important;
    margin-top: 5px !important;
  }
  .trow.grand span {
    font-size: 11px !important;
    font-weight: 800 !important;
  }
  .trow.grand .tv {
    font-size: 13px !important;
    font-weight: 900 !important;
  }
  .inv-totals div[style*="font-size:9px"] {
    font-size: 8px !important;
    margin-top: 3px !important;
  }
  .inv-totals div[style*="margin-top:24px"] {
    margin-top: 6px !important;
  }
  .inv-totals div[style*="border-top:1.5px solid"] {
    min-width: 120px !important;
    font-size: 9px !important;
    padding-top: 4px !important;
  }
  .inv-totals div[style*="border-top:1.5px solid"] span {
    font-size: 10px !important;
  }

}



