/* css/custom.css */
/* Premium Custom Style Overrides for CPR Pyro Park (Light Theme + Diwali Red & Amber 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(225, 29, 72, 0.15);
  border-color: rgba(217, 119, 6, 0.4);
}

/* Glowing buttons (Diwali Crimson & Gold Theme) */
.glow-button {
  background: linear-gradient(135deg, #e11d48 0%, #d97706 100%);
  box-shadow: 0 4px 18px 0 rgba(225, 29, 72, 0.35);
  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(225, 29, 72, 0.5);
  opacity: 0.95;
}

/* Secondary Button (Fiery Flame Orange accent) */
.accent-button {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  box-shadow: 0 4px 18px 0 rgba(245, 158, 11, 0.35);
  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(245, 158, 11, 0.5);
  opacity: 0.95;
}

/* Indigo/Crimson buttons for admin theme */
.indigo-glow-button {
  background: linear-gradient(135deg, #b91c1c 0%, #d97706 100%);
  box-shadow: 0 4px 18px 0 rgba(185, 28, 28, 0.35);
  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(185, 28, 28, 0.5);
  opacity: 0.95;
}

/* Brand gradient text */
.brand-text-gradient {
  background: linear-gradient(135deg, #e11d48 0%, #d97706 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: #6b0707;
}
::-webkit-scrollbar-thumb {
  background: #d97706;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

/* Floating Sidebar styles */
.floating-sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(107, 7, 7, 0.88);
  padding: 12px 8px;
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 119, 6, 0.5);
  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;
}

/* ════════════════════════════════════════════════════════ */
  .inv-card {
  background: #fff;
  overflow: hidden;
  border: 2px solid #0f172a;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.03);
}
.inv-head {
  background: transparent;
  color: #0f172a;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  border-bottom: 2px solid #0f172a;
  margin: 0;
}
.inv-head .co-name {
  font-size: 18px; font-weight: 900;
  letter-spacing: -.02em; margin: 0 0 3px; line-height: 1.1;
  color: #0f172a;
}
.inv-head .co-sub {
  font-size: 10px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .08em;
}
.inv-head .co-detail {
  margin-top: 8px; font-size: 10px; color: #475569; line-height: 1.6;
}
.inv-head .co-detail strong {
  color: #0f172a;
}
.inv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
}
.inv-meta .inv-id {
  font-size: 18px; font-weight: 900;
  font-family: monospace; line-height: 1.1;
  color: #0f172a;
}
.inv-meta .inv-date { font-size: 10px; color: #475569; margin-top: 2px; }
.inv-meta .inv-badge {
  display: inline-block; margin-top: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  background: transparent;
  border: 1.5px solid #0f172a;
  color: #0f172a;
  white-space: nowrap;
}

/* 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-red { background:#fffbe8; color:#b45309; border-color:#fde68a; }
.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: 2px solid #0f172a;
}
.inv-party { padding: 16px 24px; }
.inv-party:first-child { border-right: 2px solid #0f172a; }
.inv-party-lbl {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em;
  color: #475569; margin-bottom: 6px;
}
.inv-party-name {
  font-size: 14px; 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: 16px 24px; border-bottom: 2px solid #0f172a; }
.inv-tbl-wrap h4 {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #0f172a; margin: 0 0 10px;
}
table.inv-tbl {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
table.inv-tbl thead tr {
  background: transparent;
  color: #0f172a;
}
table.inv-tbl th {
  padding: 10px 12px;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
  white-space: nowrap;
  color: #0f172a;
  background: transparent;
  border-bottom: 2px solid #0f172a;
  border-top: 1px solid #cbd5e1;
}
table.inv-tbl th:first-child { border-radius: 0; }
table.inv-tbl th:last-child  { border-radius: 0; }
table.inv-tbl tbody tr:nth-child(even) { background: #f8fafc; }
table.inv-tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155; font-weight: 600;
}
table.inv-tbl td.num    { text-align: right; font-family: monospace; }
table.inv-tbl td.center { text-align: center; }
table.inv-tbl td.name   { font-weight: 700; color: #0f172a; }
.strike { text-decoration: line-through; color: #94a3b8; font-size: 11px; }
.disc-pct { color: #0f172a; font-weight: 800; }

/* Footer grid */
.inv-footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  border-bottom: 2px solid #0f172a;
}
.inv-bank {
  padding: 16px 24px;
  border-right: 2px solid #0f172a;
}
.inv-bank h5 {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #0f172a;
  text-decoration: underline;
  margin: 0 0 10px;
}
.brow {
  display: flex; gap: 8px;
  font-size: 11px; color: #475569; line-height: 1.9;
}
.brow .bl { width: 90px; flex-shrink: 0; }
.brow .bv { font-weight: 700; color: #0f172a; font-family: monospace; }
.upi-section {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed #0f172a;
  display: flex; gap: 12px; align-items: center;
}
.upi-section img {
  width: 56px; height: 56px; object-fit: contain;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff;
}
.upi-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #0f172a; margin-bottom: 4px; }
.upi-val   { font-size: 10px; font-weight: 700; font-family: monospace; color: #0f172a; }

.inv-totals { padding: 16px 24px; }
.trow {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 12px;
  padding: 5px 0; color: #475569; font-weight: 600;
}
.trow .tv { font-family: monospace; font-weight: 700; color: #0f172a; }
.trow.savings .tv { color: #334155; font-weight: 900; }
.trow.grand {
  margin-top: 10px; padding: 10px 16px !important;
  background: transparent;
  border: 2px solid #0f172a;
  border-radius: 8px; color: #0f172a;
  font-size: 14px; font-weight: 900;
}
.trow.grand .tv { color: #0f172a; font-size: 18px; }

/* Footer strip */
.inv-strip {
  background: transparent;
  color: #0f172a;
  border-top: none;
  padding: 10px 24px;
  font-size: 10px; font-weight: 600;
  display: flex; justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; gap: 6px;
}
.inv-strip .note { font-style: italic; color: #334155; }
.inv-strip .seal { font-family: monospace; color: #334155; font-size: 9px; }

/* Compact layout for A4 simulated pages (PDF Download & Print Preview) */
.pdf-page .inv-head {
  padding: 16px 20px 12px !important;
  border-bottom: 2px solid #0f172a !important;
}
.pdf-page .inv-party {
  padding: 12px 20px !important;
}
.pdf-page .inv-tbl-wrap {
  padding: 12px 20px !important;
}
.pdf-page table.inv-tbl th {
  padding: 8px 10px !important;
  border-bottom: 2px solid #0f172a !important;
}
.pdf-page table.inv-tbl td {
  padding: 6px 10px !important;
}
.pdf-page .inv-footer-grid {
  padding: 12px 20px !important;
  gap: 15px !important;
}
.pdf-page .inv-strip {
  padding: 8px 20px !important;
}

/* Off-screen wrapper for rendering printable invoices and PDF generation */
.print-area-wrapper {
  height: 0;
  overflow: hidden;
  position: relative;
}
.print-area-container {
  width: 794px;
  background: #ffffff;
}

/* Force background colors and styles in print preview */
@media print {
  /* Hide all main page content in print */
  body * {
    visibility: hidden !important;
  }
  
  /* Show only the print area wrapper and its children */
  .print-area-wrapper,
  .print-area-wrapper * {
    visibility: visible !important;
  }
  
  /* Position print area wrapper at the top left of the print sheet */
  .print-area-wrapper {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }
  
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Centered card frame with outer border matching page 1 */
  .inv-card {
    border: 2px solid #0f172a !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    padding: 24px !important;
    margin: 10mm auto !important;
    width: 190mm !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  
  /* Native page break layout */
  .inv-head {
    padding: 12px 0 !important;
    border-bottom: 2px solid #0f172a !important;
  }
  
  .inv-parties {
    border-bottom: 2px solid #0f172a !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
  .inv-party {
    padding: 12px 0 !important;
  }
  .inv-party:first-child {
    border-right: 2px solid #0f172a !important;
  }
  
  table.inv-tbl {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  /* Repeat header on top of every page natively */
  table.inv-tbl thead {
    display: table-header-group !important;
  }
  table.inv-tbl tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  table.inv-tbl th {
    padding: 10px 8px !important;
    border-bottom: 2px solid #0f172a !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
  }
  table.inv-tbl td {
    padding: 8px 8px !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }
  
  .inv-footer-grid {
    padding: 15px 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    display: grid !important;
    grid-template-columns: 1.2fr 0.8fr !important;
  }
  .inv-strip {
    padding: 10px 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  @page {
    size: A4 portrait;
    margin: 0;
  }
}

