/* ═══════════════════════════════════════════════════════════════════════════
   Print Stylesheet — hides interactive elements, formats content for paper.
   Used by B2B customers printing quotes, invoices, order confirmations.
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    /* Hide navigation, sidebars, interactive elements */
    .sidebar,
    .nav-links,
    .sidebar-brand,
    .sidebar-version,
    header,
    footer,
    nav,
    #chat-fab,
    #chat-panel,
    #toast-container,
    .btn,
    button:not(.no-print-hide),
    .stats-grid,
    .page-subtitle,
    [x-data],
    .chat-panel,
    .msg-nav-badge,
    .nav-item {
        display: none !important;
    }

    /* Reset layout */
    body {
        background: white !important;
        color: #1A1A1A !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .app-layout {
        display: block !important;
    }

    .content {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        max-width: none !important;
    }

    /* Page title */
    .page-title {
        font-size: 16pt !important;
        margin-bottom: 0.5cm !important;
        color: #1A1A1A !important;
    }

    /* Cards and sections */
    .stat-card,
    .card,
    .dash-section,
    [style*="border-radius"] {
        border: 1px solid #ccc !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    /* Tables */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th, td {
        border: 1px solid #ccc !important;
        padding: 4pt 8pt !important;
        font-size: 9pt !important;
    }

    th {
        background: #f0f0f0 !important;
        font-weight: 600 !important;
    }

    /* Links — show URL */
    a[href]:not(.no-print-url)::after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #666;
    }

    a[href^="/"]::after,
    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "" !important;
    }

    /* Page breaks */
    h1, h2, h3 {
        break-after: avoid;
    }

    /* Print header for branded output */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 1cm;
        padding-bottom: 0.5cm;
        border-bottom: 2px solid #6A6E8A;
    }

    .print-header .brand {
        font-size: 14pt;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }

    /* Ensure backgrounds print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
