/* CSS Variables and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,100..1000&display=swap');

:root {
  --c-glass: #bbbbbc;
  --c-light: #fff;
  --c-dark: #000;
  --c-content: #224;
  --c-action: #0052f5;
  --c-bg: #E8E8E9;
  --glass-reflex-dark: 1;
  --glass-reflex-light: 1;
  --saturation: 150%;
  --lg-bg-color: rgba(255, 255, 255, 0.25);
  --lg-highlight: rgba(255, 255, 255, 0.75);
  --lg-text: #007aff;
  --lg-hover-glow: rgba(255, 255, 255, 0.4);
  --lg-red: #fb4268;
  --lg-grey: #5b5b5b;
}

body {
  font-size: 20px;
  font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  background: var(--c-bg);
  color: var(--c-content);
  transition: background 400ms cubic-bezier(1, 0.0, 0.4, 1), color 400ms cubic-bezier(1, 0.0, 0.4, 1);
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  animation: pageEntrance 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Overlay Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.95);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

/* Liquid Glass Modal - More Curvy and Pill-Shaped */
.liquid-glass-modal {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-radius: 48px;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18), 0 0 0 2px rgba(255,255,255,0.13) inset;
  padding: 3rem 4rem 2.5rem 3rem;
  max-width: 800px;
  width: 90%;
  max-height: fit-content;
  overflow-y: visible;
  transform: scale(0.7) translateY(40px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem;
}

.modal-overlay.active .liquid-glass-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  animation: headerEntrance 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
}

@keyframes headerEntrance {
  0% {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-content);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--c-content);
  font-size: 1.7rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: scale(1.1);
}

/* Form Styles */
.glass-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: formFieldEntrance 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }

@keyframes formFieldEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.form-label {
  font-weight: 600;
  color: var(--c-content);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* More Curvy Inputs */
.glass-input {
  background: rgba(255, 255, 255, 0.13);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 2rem;
  padding: 1.1rem 1.6rem;
  font-size: 1.08rem;
  color: var(--c-content);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.glass-input:focus {
  border-color: var(--c-action);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 4px rgba(0, 82, 245, 0.10);
}

.glass-input::placeholder {
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.98em;
}

/* Form Grid for better layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
}

.form-grid .form-group:last-child {
  grid-column: 1 / -1;
}

/* Button Styles */
.modal-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: flex-end;
  animation: buttonsEntrance 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.7s both;
}

@keyframes buttonsEntrance {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.glass-btn {
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.glass-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.glass-btn:hover::before {
  left: 100%;
}

.glass-btn:active {
  transform: translateY(2px) scale(0.98);
  transition: all 0.1s;
}

.glass-btn-primary {
  background: linear-gradient(135deg, var(--c-action) 0%, #0051a8 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 82, 245, 0.3);
}

.glass-btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 82, 245, 0.4);
}

.glass-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--c-content);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.glass-btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #dc2626;
}

.glass-btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

.glass-btn-danger:disabled {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: rgba(220, 38, 38, 0.5);
  cursor: not-allowed;
  transform: none;
}

/* Existing Products Modal Styles */
.existing-products-modal {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-radius: 48px;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18), 0 0 0 2px rgba(255,255,255,0.13) inset;
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  max-width: 800px;
  width: 96%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.7) translateY(40px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.modal-overlay.active .existing-products-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Products List Styles */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.product-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--c-action);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-item.selected {
  background: rgba(0, 82, 245, 0.1);
  border-color: var(--c-action);
  box-shadow: 0 0 0 2px rgba(0, 82, 245, 0.2);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.product-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-content);
}

.product-price {
  font-weight: 600;
  color: var(--c-action);
  font-size: 1rem;
}

.product-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
}

.product-detail {
  display: flex;
  flex-direction: column;
}

.product-detail-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-detail-value {
  font-weight: 500;
}

.no-products {
  text-align: center;
  padding: 2rem;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
}

/* Modal Content Wrapper and Scroll Buttons */
.modal-content-wrapper {
  position: relative;
  max-height: 350px;
  overflow: hidden;
}

.scroll-btn {
  position: absolute;
  right: 15px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scroll-btn:hover {
  background: rgba(59, 130, 246, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.scroll-btn:active {
  transform: scale(0.95);
}

.scroll-btn-up {
  top: 15px;
}

.scroll-btn-down {
  bottom: 15px;
}

.scroll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.products-list, .customers-list {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.products-list::-webkit-scrollbar, .customers-list::-webkit-scrollbar {
  width: 6px;
}

.products-list::-webkit-scrollbar-track, .customers-list::-webkit-scrollbar-track {
  background: transparent;
}

.products-list::-webkit-scrollbar-thumb, .customers-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

.products-list::-webkit-scrollbar-thumb:hover, .customers-list::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Bills List Styles */
.bills-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.bills-list::-webkit-scrollbar {
  width: 6px;
}

.bills-list::-webkit-scrollbar-track {
  background: transparent;
}

.bills-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

.bills-list::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

.bill-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bill-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--c-action);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bill-item.selected {
  background: rgba(0, 82, 245, 0.1);
  border-color: var(--c-action);
  box-shadow: 0 0 0 2px rgba(0, 82, 245, 0.2);
}

.bill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.bill-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-content);
}

.bill-amount {
  font-weight: 600;
  color: var(--c-action);
  font-size: 1rem;
}

.bill-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
}

.bill-detail {
  display: flex;
  flex-direction: column;
}

.bill-detail-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bill-detail-value {
  font-weight: 500;
}

.bill-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bill-action-btn {
  padding: 0.3rem 0.8rem;
  border: none;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(59, 130, 246, 0.1);
  color: var(--c-action);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.bill-action-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.bill-action-btn.load {
  background: rgba(34, 197, 94, 0.1);
  color: #059669;
  border-color: rgba(34, 197, 94, 0.2);
}

.bill-action-btn.load:hover {
  background: rgba(34, 197, 94, 0.2);
}

.no-bills {
  text-align: center;
  padding: 2rem;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
}

/* GST Percentages Modal Styles */
.gst-percentages-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  width: 100%;
}

.gst-option {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gst-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gst-option:hover::before {
  opacity: 1;
}

.gst-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.gst-option.selected {
  background: rgba(0, 82, 245, 0.2);
  border-color: rgba(0, 82, 245, 0.4);
  box-shadow: 0 4px 16px rgba(0, 82, 245, 0.2);
}

.gst-option.selected::before {
  background: linear-gradient(135deg, rgba(0, 82, 245, 0.1), rgba(0, 82, 245, 0.05));
  opacity: 1;
}

.gst-percentage {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-content);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.gst-description {
  font-size: 0.875rem;
  color: var(--c-content);
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* Responsive Design for Modal */
@media (max-width: 600px) {
  .liquid-glass-modal, .existing-products-modal {
    padding: 1.2rem 1rem 1.2rem 0.5rem;
    margin: 1rem;
    width: calc(100% - 2rem);
    border-radius: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .modal-buttons {
    flex-direction: column;
    gap: 0.7rem;
  }
  .glass-btn {
    width: 100%;
  }
  .product-details {
    grid-template-columns: 1fr 1fr;
  }
  
  .gst-percentages-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .gst-option {
    padding: 1rem;
  }
  
  .gst-percentage {
    font-size: 1.25rem;
  }
  
  /* Mobile scroll button adjustments */
  .scroll-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    right: 10px;
  }
  
  .scroll-btn-up {
    top: 10px;
  }
  
  .scroll-btn-down {
    bottom: 10px;
  }
  
  .modal-content-wrapper {
    max-height: 300px;
  }
  
  .products-list, .customers-list {
    max-height: 250px;
  }
}

/* Glassmorphism Nav Bar Styles */
.glass-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  height: 70px;
  box-sizing: border-box;
  padding: 8px 12px 10px;
  margin: 2em auto 2.5em auto;
  border: none;
  border-radius: 99em;
  background-color: color-mix(in srgb, var(--c-glass) 12%, transparent);
  backdrop-filter: blur(8px) saturate(var(--saturation));
  -webkit-backdrop-filter: blur(8px) saturate(var(--saturation));
  box-shadow: 
    inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 10%), transparent),
    inset 1.8px 3px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent), 
    inset -2px -2px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent), 
    inset -3px -8px 1px -6px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent), 
    inset -0.3px -1px 4px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 12%), transparent), 
    inset -1.5px 2.5px 0px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent), 
    inset 0px 3px 4px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent), 
    inset 2px -6.5px 1px -4px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent), 
    0px 1px 5px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent), 
    0px 6px 16px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  position: relative;
  animation: navBarEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes navBarEntrance {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.glass-nav-btn {
  --c: var(--c-content);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 32px;
  height: 54px;
  box-sizing: border-box;
  border-radius: 99em;
  background: none;
  border: none;
  font-family: "DM Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c);
  opacity: 1;
  transition: all 160ms;
  cursor: pointer;
  outline: none;
}

.glass-nav-btn:hover {
  --c: var(--c-action);
  background: rgba(255,255,255,0.18);
  scale: 1.08;
}

/* Invoice Container Styles */
.invoice-container {
  max-width: 8.5in;
  min-height: 11in;
  margin: 2rem auto;
  padding: 2.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  background-color: white;
  border: 1px solid #e5e7eb;
  width: 100%;
  box-sizing: border-box;
  animation: invoiceEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

@keyframes invoiceEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  display: block;
}

.table-responsive table {
  min-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

[contenteditable="true"] {
  outline: 2px dashed transparent;
  transition: outline 0.2s;
}

[contenteditable="true"]:hover,
[contenteditable="true"]:focus {
  outline-color: #60a5fa;
  background-color: #f0f9ff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #d1d5db;
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: #f3f4f6;
  font-weight: 600;
}

.invoice-header, .invoice-footer {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.invoice-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-8 { gap: 2rem; }

.company-address {
  font-size: 1.1rem;
  line-height: 1.6;
  white-space: pre-line;
  display: block;
  margin-bottom: 0.5rem;
  word-break: break-word;
  max-width: 320px;
}

/* Utility Classes */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-8 { margin-top: 2rem; }
.flex { display: flex; }
.h-16 { height: 4rem; }
.w-1\/2 { width: 50%; }
.w-full { width: 100%; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.border-b-2 { border-bottom-width: 2px; }
.border-t { border-top-width: 1px; }
.border-t-2 { border-top-width: 2px; }
.border-gray-200 { --tw-border-opacity: 1; border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); }
.bg-gray-100 { --tw-bg-opacity: 1; background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); }
.pb-4 { padding-bottom: 1rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-4 { padding-top: 1rem; }
.text-left { text-align: left; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.text-gray-500 { --tw-text-opacity: 1; color: rgb(107 114 128 / var(--tw-text-opacity, 1)); }
.text-gray-600 { --tw-text-opacity: 1; color: rgb(75 85 99 / var(--tw-text-opacity, 1)); }
.text-gray-700 { --tw-text-opacity: 1; color: rgb(55 65 81 / var(--tw-text-opacity, 1)); }
.text-gray-800 { --tw-text-opacity: 1; color: rgb(31 41 55 / var(--tw-text-opacity, 1)); }

/* Liquid Glassmorphism Styles */
.liquid-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.top-bar-glass {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  margin-bottom: 1.5rem;
  background: transparent;
  box-shadow: none;
  border: none;
}

.bar-left, .bar-right {
  display: flex;
  gap: 1rem;
}

/* Glass Button Style */
.glass-button {
  padding: 16px 36px;
  font-size: 18px;
  font-weight: 700;
  color: #007aff;
  background: rgba(255, 255, 255, 0.18);
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.4,1.5,.5,1);
  outline: none;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  border-color: #007aff;
  color: #0051a8;
}

.glass-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--lg-text);
  cursor: pointer;
  background: transparent;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), 0 0 20px rgba(0, 0, 0, 0.08);
  min-width: 140px;
  min-height: 54px;
  margin: 0 0.5rem;
  transition: box-shadow 0.3s, transform 0.2s;
}

.glass-container:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  filter: none;
  isolation: isolate;
}

.glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--lg-bg-color);
}

.glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  overflow: hidden;
  box-shadow: inset 1px 1px 0 var(--lg-highlight),
    inset 0 0 5px var(--lg-highlight);
}

.glass-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--lg-text);
  padding: 0.7rem 2.2rem;
  border-radius: 999px;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}

.glass-content:active {
  color: #0051a8;
}

.glass-container:hover .glass-overlay {
  background: rgba(255,255,255,0.38);
}

.glass-container:hover .glass-content {
  color: #0051a8;
}

.glass-buttons-row {
  display: flex;
  flex-direction: row;
  gap: 1.2rem;
  background: none;
  pointer-events: none;
  width: auto;
  margin-bottom: 1.5rem;
}

.glass-buttons-left {
  position: sticky;
  top: 2rem;
  left: 2.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1.2rem;
  width: auto;
  background: none;
  pointer-events: none;
}

.glass-buttons-right {
  position: sticky;
  top: 2rem;
  right: 2.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 1.2rem;
  width: auto;
  background: none;
  pointer-events: none;
}

.glass-buttons-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3000;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(120deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.16) 100%);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.10), 0 2px 0 0 rgba(0,0,0,0.04);
  border-bottom: 1.5px solid rgba(200,200,255,0.10);
  pointer-events: auto;
  padding: 1.2rem 2.5rem 1.2rem 2.5rem;
  margin-bottom: 2rem;
  margin-top: 0.5rem;
  box-sizing: border-box;
}

.glass-buttons-left, .glass-buttons-right {
  display: flex;
  flex-direction: row;
  gap: 1.6rem;
  background: none;
  pointer-events: auto;
}

.glass-container {
  pointer-events: auto;
  position: relative;
  min-width: 150px;
  min-height: 56px;
  border-radius: 999px;
  box-shadow: 0 4px 12px 0 rgba(0,0,0,0.13);
  overflow: visible;
  margin: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  backdrop-filter: blur(36px) saturate(1.4);
  -webkit-backdrop-filter: blur(36px) saturate(1.4);
  filter: none;
  isolation: isolate;
}

.glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.10) 100%);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.18) inset;
}

.glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 2px 18px 0 var(--lg-highlight),
    inset 0 0 24px 0 var(--lg-highlight),
    0 1.5px 8px 0 rgba(255,255,255,0.10) inset;
  opacity: 0.7;
}

.glass-content {
  position: relative;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: #007aff;
  padding: 13px 28px;
  border-radius: 36px;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.10);
  outline: none;
  cursor: pointer;
  transition: color 0.2s, box-shadow 0.2s, background 0.2s;
  user-select: none;
  pointer-events: auto;
  text-shadow: none;
  margin: 0 4px;
  overflow: visible;
  z-index: 1;
}

.glass-content span, .glass-content svg, .glass-content i {
  position: relative;
  z-index: 2;
}

.glass-content:active {
  color: #0051a8;
}

.glass-container:hover .glass-content, .glass-content:hover {
  background-color: rgba(255,255,255,0.28);
  color: #0051a8;
  box-shadow: 0 6px 14px 0 rgba(0,0,0,0.13);
}

.table-responsive table {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  max-width: none;
  min-width: 0;
}

/* Glass Pill Styles */
.glass-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  height: 54px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 99em;
  background-color: color-mix(in srgb, var(--c-glass) 12%, transparent);
  color: var(--c-content);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1.5px solid color-mix(in srgb, var(--c-light) 40%, transparent);
  backdrop-filter: blur(8px) saturate(var(--saturation));
  -webkit-backdrop-filter: blur(8px) saturate(var(--saturation));
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

.glass-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.glass-pill:hover::before {
  left: 100%;
}

.glass-pill:hover {
  background: rgba(255,255,255,0.18);
  color: var(--c-action);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.glass-pill:active {
  transform: translateY(-2px) scale(1.02);
  transition: all 0.1s;
}

.glass-pill-bar {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 2em auto 2.5em auto;
}

/* Ensure invoice text is black */
.invoice-container,
.invoice-container h1,
.invoice-container h2,
.invoice-container h3,
.invoice-container p,
.invoice-container span,
.invoice-container td,
.invoice-container th,
.invoice-container label,
.invoice-container input,
.invoice-container textarea {
  color: #111 !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .liquid-glass-modal {
    padding: 2.5rem 3rem 2rem 2.5rem;
    max-width: 700px;
    width: 95%;
  }
  
  .glass-pill-bar {
    gap: 12px;
    margin: 1.5em auto 2em auto;
  }
}

@media (max-width: 900px) {
  .liquid-glass-modal {
    padding: 2rem 2.5rem 1.5rem 2rem;
    max-width: 600px;
    border-radius: 32px;
  }
  
  .glass-pill {
    padding: 0 24px;
    height: 48px;
    font-size: 1rem;
  }
  
  .glass-pill-bar {
    gap: 10px;
    margin: 1.25em auto 1.75em auto;
  }
}

@media (max-width: 700px) {
  .table-responsive table {
    min-width: 600px;
  }
  
  .liquid-glass-modal {
    padding: 1.5rem 2rem 1.25rem 1.5rem;
    max-width: 500px;
    border-radius: 24px;
    margin: 1rem;
  }
  
  .glass-pill {
    padding: 0 20px;
    height: 44px;
    font-size: 0.95rem;
  }
  
  .glass-pill-bar {
    gap: 8px;
    margin: 1em auto 1.5em auto;
    flex-wrap: wrap;
  }
}

@media (max-width: 500px) {
  .glass-buttons-bar {
    padding: 0.3rem 0.2rem 0.5rem 0.2rem;
    border-radius: 0 0 10px 10px;
  }
  
  .glass-content {
    font-size: 0.89rem;
    padding: 6px 8px;
    border-radius: 16px;
  }
  
  .invoice-container {
    padding: 0.2rem;
    border-radius: 0.1rem;
  }
  
  .table-responsive table, .table-responsive th, .table-responsive td {
    font-size: 0.89rem;
  }
  
  .liquid-glass-modal {
    padding: 1rem 1.5rem 0.75rem 1rem;
    max-width: 400px;
    border-radius: 20px;
    margin: 0.5rem;
  }
  
  .glass-pill {
    padding: 0 16px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .glass-pill-bar {
    gap: 6px;
    margin: 0.75em auto 1.25em auto;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .glass-form {
    gap: 0.75rem;
  }
  
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  .glass-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {
  .liquid-glass-modal {
    padding: 0.75rem 1rem 0.5rem 0.75rem;
    max-width: 350px;
    border-radius: 16px;
    margin: 0.25rem;
  }
  
  .glass-pill {
    padding: 0 12px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  .glass-pill-bar {
    gap: 4px;
    margin: 0.5em auto 1em auto;
  }
  
  .modal-header h2 {
    font-size: 1.1rem;
  }
  
  .glass-form {
    gap: 0.5rem;
  }
  
  .form-group {
    margin-bottom: 0.5rem;
  }
  
  .glass-input {
    padding: 0.375rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .liquid-glass-modal {
    padding: 1rem 2rem;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .glass-pill-bar {
    margin: 1em auto;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .glass-pill,
  .liquid-glass-modal {
    border-width: 1px;
  }
}


