@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;700;900&display=swap");

:root {
  /* Formal Corporate Palette */
  --surface-bg: #f1f5f9;
  --surface-card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;

  /* Tighter, more professional geometry */
  --radius-xl: 12px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 13.5px;
}

body {
  font-family: "Vazirmatn", sans-serif;
  background-color: var(--surface-bg);
  color: var(--slate-900);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Layout Architecture */
.app-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  background: var(--slate-900);
  color: white;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  font-size: 1.5rem;
  padding: 1.5rem 0.5rem;
  margin-bottom: 2rem;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  color: var(--slate-400);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-link svg {
  width: 20px;
  height: 20px;
}

.nav-badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 1rem;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
}

/* Collapsible Navigation */
.nav-section {
  margin-bottom: 0.5rem;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  color: var(--slate-400);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  user-select: none;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.nav-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-section-header svg.chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}

.nav-section.active .nav-section-header {
  color: white;
}

.nav-section.active .nav-section-header svg.chevron {
  transform: rotate(-180deg);
}

.nav-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.5rem;
}

.nav-section.active .nav-section-content {
  max-height: 500px;
  /* Adjust as needed */
  margin-top: 0.25rem;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0;
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0.5rem;
}

.logout-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn svg {
  transition: transform 0.2s;
}

.logout-btn:hover svg {
  transform: translateX(-4px);
}

/* Main Content Area */
.main-area {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

/* Professional Layout - Enterprise Style */
.glass-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-200);
}

.page-title h1 {
  font-weight: 800;
  font-size: 1.875rem;
  letter-spacing: -0.025em;
  color: var(--slate-900);
}

.page-title p {
  color: var(--slate-500);
  font-size: 0.95rem;
}

.layout-grid {
  display: grid;
  gap: 1.5rem;
}

.layout-grid--cols-2-1 {
  grid-template-columns: 2.5fr 1fr;
}

.layout-grid--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {

  .layout-grid--cols-2-1,
  .layout-grid--cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Components */

/* Cards (Minimalist Elevation) */
.glass-card {
  background: var(--surface-card);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  padding: 1.5rem;
}

.stat-label {
  color: var(--slate-500);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-value {
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--slate-900);
}

/* Tables (Professional Grade) */
.table-container {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow-x: auto;
  /* Enable responsive scroll */
  -webkit-overflow-scrolling: touch;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table th {
  background: var(--slate-50);
  padding: 1rem 1.5rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--slate-600);
  border-bottom: 2px solid var(--slate-200);
}

.modern-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  font-size: 0.9rem;
  vertical-align: middle;
}

.modern-table tr:last-child td {
  border-bottom: none;
}

.modern-table tr:hover td {
  background: var(--slate-50);
}

/* Buttons */
.btn {
  font-family: inherit;
  /* Fix Persian font issues in buttons */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-ghost {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-ghost:hover {
  background: #e0e7ff;
}

.btn-outline {
  border-color: var(--slate-200);
  color: var(--slate-600);
}

.btn-outline:hover {
  border-color: var(--slate-400);
  background: var(--slate-50);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
}

/* Badges & Pills */
.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-pending {
  background: var(--warning-light, #fffbeb);
  color: var(--warning, #b45309);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-confirmed {
  background: var(--success-light, #ecfdf5);
  color: var(--success, #047857);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-processing {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-cancelled {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Order Page (Shopping Experience) */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.product-info-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 1.25rem;
}

.units-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.unit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--slate-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-100);
  gap: 1.5rem;
}

.unit-label-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 100px;
}

.unit-badge {
  background: var(--slate-200);
  color: var(--slate-700);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.unit-details {
  font-size: 0.7rem;
  color: var(--slate-400);
  font-weight: 600;
  text-align: center;
}

.unit-pricing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.unit-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--slate-900);
}

.unit-currency {
  font-size: 0.7rem;
  color: var(--slate-400);
  font-weight: 600;
}

.unit-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 768px) {
  .unit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
  }

  .unit-label-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .unit-pricing {
    align-items: center;
    border-top: 1px dashed var(--slate-200);
    padding-top: 0.75rem;
  }

  .unit-actions {
    justify-content: center;
  }
}

.qty-control {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 50px;
  padding: 0.35rem;
  width: auto;
  min-width: 140px;
  gap: 0;
  justify-content: space-between;
  transition: all 0.2s;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--slate-600);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
}

.qty-input,
.qty-display,
.persian-input {
  flex: 1;
  text-align: center;
  border: none !important;
  background: transparent !important;
  font-weight: 800;
  font-size: 1.5rem;
  outline: none !important;
  color: var(--slate-900);
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  user-select: auto;
  min-width: 40px;
}

@media (max-width: 768px) {
  .qty-control {
    min-width: 140px;
    padding: 0.25rem;
  }

  .qty-display,
  .persian-input {
    font-size: 1.1rem;
  }
}

/* Specific fix for staff inputs to avoid form-control clash */
.persian-input {
  width: 70px;
  height: auto !important;
  box-shadow: none !important;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Professional Docked Action Bar */
.checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 240px;
  /* Sidebar width */
  background: var(--slate-900);
  color: white;
  padding: 0.875rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--slate-800);
}

.summary-group {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.summary-stat {
  display: flex;
  flex-direction: column;
}

.summary-stat .label {
  font-size: 0.7rem;
  color: var(--slate-400);
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 2px;
}

.summary-stat .value {
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
}

.summary-divider {
  height: 32px;
  width: 1px;
  background: var(--slate-700);
}

@media (max-width: 1024px) {
  .checkout-bar {
    right: 0;
    padding: 1.25rem;
    flex-direction: column;
    gap: 1rem;
  }

  .summary-group {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }

  .summary-stat .value {
    font-size: 1.2rem;
  }

  .checkout-bar .btn {
    width: 100%;
  }
}

.order-footer-spacer {
  height: 120px;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--slate-50);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-control:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Mobile Infrastructure */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--slate-200);
  z-index: 1200;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1300;
}

@media (max-width: 1024px) {
  .app-wrapper {
    grid-template-columns: 1fr;
  }

  .mobile-header {
    display: flex;
  }

  .sidebar {
    position: fixed;
    right: -240px;
    top: 0;
    bottom: 0;
    width: 240px;
    z-index: 1400;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.1);
  }

  .sidebar.open {
    right: 0;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-area {
    padding: 1rem;
  }

  /* Fix the 'Finalize Order' bar on mobile */
  .checkout-bar--top {
    position: fixed;
    top: 57px;
    /* Below mobile header height */
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    padding: 0.75rem 1rem;
    z-index: 1100;
    background: var(--slate-900);
  }

  .checkout-stat {
    gap: 0.75rem;
  }

  .stat-item .value {
    font-size: 1.1rem;
  }

  .checkout-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
  }

  .checkout-bar--bottom {
    display: none;
  }

  .order-footer-spacer {
    height: 80px;
  }

  .page-title h1 {
    font-size: 1.35rem;
  }

  .page-title p {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .btn {
    width: 100%;
    justify-content: center;
  }

  .main-area {
    padding: 1rem 0.75rem;
  }

  /* Force Table to Cards on Mobile */
  .mobile-table-to-cards thead {
    display: none !important;
  }

  .mobile-table-to-cards form,
  .mobile-table-to-cards table,
  .mobile-table-to-cards tbody,
  .mobile-table-to-cards tfoot,
  .mobile-table-to-cards tr,
  .mobile-table-to-cards td {
    display: block !important;
    width: 100% !important;
  }

  .mobile-table-to-cards tr {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
  }

  .mobile-table-to-cards td {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--slate-50) !important;
    padding: 0.75rem 0 !important;
    text-align: right !important;
    min-height: 3rem;
  }

  .mobile-table-to-cards td:last-child {
    border-bottom: none !important;
  }

  .mobile-table-to-cards td::before {
    content: attr(data-label);
    font-weight: 800;
    color: var(--slate-500);
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-left: 1rem;
  }

  .mobile-table-to-cards tfoot td {
    display: block !important;
    text-align: center !important;
    border: none !important;
  }

  .mobile-table-to-cards tfoot td::before {
    display: none !important;
  }

  /* Hide Price and Total on Mobile to save space */
  .mobile-table-to-cards td[data-label="قیمت واحد (تومان)"],
  .mobile-table-to-cards td[data-label="جمع نهایی"],
  .mobile-table-to-cards td[data-label="وضعیت عملیاتی"],
  .mobile-table-to-cards td[data-label="ارزش کل (تومان)"] {
    display: none !important;
  }

  /* Fixed Table Responsiveness for general tables */
  .table-container {
    border-radius: var(--radius-md);
    margin: 0;
    width: 100%;
    overflow-x: auto;
  }

  .modern-table {
    min-width: unset;
  }

  /* Staff Detail Layout */
  .layout-grid--cols-2-1 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}

.no-mobile {
  display: initial;
}

@media (max-width: 640px) {
  .no-mobile {
    display: none !important;
  }

  /* Product Cards in Create Order */
  .product-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .product-item {
    display: block !important;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .product-item .row-info {
    margin-bottom: 1.25rem;
  }

  .product-item .row-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .product-item .pricing-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--slate-100);
    margin-top: 0.75rem;
  }

  .qty-control {
    min-width: 200px;
    padding: 0.5rem 1rem;
  }

  .staff-add-item-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
}

/* Formal Invoice Styling (High-Precision for Print) */
.formal-invoice-print-only {
  display: none;
  font-family: "Vazirmatn", sans-serif;
  color: #000;
  max-width: 21cm;
  /* A4 Width */
  margin: 0 auto;
}

.invoice-formal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #000;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.invoice-logo-section {
  line-height: 1.6;
}

.invoice-title {
  text-align: center;
  flex: 1;
}

.invoice-title h1 {
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0;
}

.invoice-title p {
  font-size: 0.95rem;
  margin: 0.25rem 0 0 0;
  font-weight: 600;
}

.invoice-parties {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.party-box {
  flex: 1;
  border: 2px solid #000;
  border-radius: 4px;
  overflow: hidden;
}

.party-box h3 {
  font-size: 0.95rem;
  font-weight: 900;
  margin: 0;
  background: #eee !important;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid #000;
  text-align: center;
}

.party-content {
  padding: 0.75rem 1rem;
}

.party-row {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  display: flex;
  gap: 0.5rem;
}

.party-row span {
  font-weight: 400;
}

.party-row strong {
  font-weight: 800;
}

.formal-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.formal-items-table th,
.formal-items-table td {
  border: 1px solid #000 !important;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
}

.formal-items-table th {
  background: #f5f5f5 !important;
  font-weight: 900;
}

.invoice-formal-footer {
  margin-top: 2rem;
}

.footer-note {
  font-size: 0.7rem;
  border: 1px solid #000;
  padding: 0.75rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.signature-section {
  display: flex;
  gap: 1rem;
}

.sig-box {
  flex: 1;
  border: 2px solid #000;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.5rem;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Print Styles - Formal Document Layout Engine */
/* High-Precision Print Engine (Fix for Page Overflow & Alignment) Override */
@media print {
  @page {
    size: A4;
    margin: 1.5cm;
  }

  .app-wrapper,
  .sidebar,
  .main-area,
  .no-print,
  header,
  nav,
  .mobile-nav-bar,
  .sidebar-overlay,
  .content-header {
    display: none !important;
  }

  html,
  body {
    display: block !important;
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
  }

  .formal-invoice-print-only {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .formal-invoice-print-only,
  .formal-invoice-print-only * {
    visibility: visible !important;
  }

  table {
    width: 100% !important;
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
}