@media print {
  @page {
    margin: 0;
    size: auto;
  }

  * {
    background: white !important;
    color: black !important;
  }

  html, body {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    height: auto !important;
    min-height: auto !important;
  }

  #layout-sidebar,
  #layout-topbar,
  #mobile-sidebar-overlay,
  footer,
  .no-print,
  [data-controller="sidebar"],
  [data-controller="profile"] > .no-print,
  .alert,
  .btn,
  button,
  nav,
  header,
  .sticky,
  .fixed {
    display: none !important;
  }

  #layout-content > div:first-child {
    display: none !important;
  }

  #layout-container {
    display: block !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
  }

  #layout-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
  }

  #layout-content > .flex-1 {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: auto !important;
  }

  #layout-content > .flex-1 > [data-controller="profile"] > .no-print {
    display: none !important;
  }

  .print-only {
    display: flex !important;
  }

  .print-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto !important;
    min-height: auto !important;
    width: 100%;
    padding: 2rem 2rem 1rem 2rem;
    gap: 2rem;
    page-break-inside: avoid;
    page-break-after: avoid;
    margin: 0;
  }

  .print-logo {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
  }

  .print-logo img {
    width: 100%;
    height: auto;
  }

  .print-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: -1rem;
  }

  .print-user-info img,
  .print-user-info > div {
    width: 120px !important;
    height: 120px !important;
    font-size: 3rem !important;
  }

  .print-user-name {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
  }

  .print-qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }

  .print-qr-code > div {
    width: 600px !important;
    height: 600px !important;
  }

  .print-qr-code svg {
    width: 600px !important;
    height: 600px !important;
  }
}

.print-only {
  display: none;
}
