/* Viewer CSS */

/* ==========================================================================
   VIEWER CONTAINER & WORKSPACE
   ========================================================================== */

.viewer-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* Gorgeous workspace desk background matching sidebar */
    background: var(--clr-bg);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
        radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        linear-gradient(var(--sidebar-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--sidebar-border) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    background-position: center;
    overflow: hidden;
    position: relative;
}

/* Prevent text selection/copying on the document paper */
#document-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.document-preview-wrapper {
    flex: 1;
    position: relative;
    padding: 65px 24px 150px 24px;
    overflow-y: auto;
    /* Soft scrollbar for preview */
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

/* =========================================
   DOCUMENT TOOLBAR (APPLE-STYLE DOCK)
   ========================================= */
.document-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--clr-white);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--sidebar-border);

    /* Fixed at the top */
    position: fixed;
    top: 30px;
    left: calc(50% + 140px);
    transform: translateX(-50%);
    width: 90%;
    max-width: 21cm;
    z-index: 99;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.document-toolbar:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 992px) {
    .document-toolbar {
        left: 50%;
        top: 80px;
        /* Space for mobile top bar */
    }
}

.toolbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--clr-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-title i {
    font-size: 1.4rem;
    color: var(--clr-primary);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
}

.btn-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-body);
}

.btn-toolbar i {
    font-size: 1.2rem;
}

/* Word Style */
.btn-toolbar.docx {
    background: #e6f0ff;
    color: #2b579a;
    border-color: #cce0ff;
}

.btn-toolbar.docx:hover {
    background: #2b579a;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(43, 87, 154, 0.25);
}

/* PDF Style */
.btn-toolbar.pdf {
    background: #ffe6e6;
    color: #e3242b;
    border-color: #ffcccc;
}

.btn-toolbar.pdf:hover {
    background: #e3242b;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(227, 36, 43, 0.25);
}

/* Settings Toolbar Style */
.toolbar-settings-wrapper {
    position: relative;
    display: inline-block;
}

.btn-toolbar.settings-btn {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    padding: 10px 14px;
}

.btn-toolbar.settings-btn:hover,
.btn-toolbar.settings-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.4);
}

.doc-settings-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 15px);
    background: var(--clr-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--sidebar-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: 8px;
    min-width: 220px;
    animation: dropScale 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top right;
    display: none;
    /* hidden by default */
}

.doc-settings-menu.show {
    display: flex !important;
}

@keyframes dropScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.doc-setting-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--clr-dark);
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.doc-setting-item i {
    font-size: 1.2rem;
    color: var(--clr-text-light);
    transition: all 0.2s ease;
}

.doc-setting-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-primary);
}

.doc-setting-item:hover i {
    color: var(--clr-primary);
}

/* =========================================
   DOCUMENT SETTINGS MODAL (PREMIUM UI)
   ========================================= */
.doc-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.doc-settings-overlay.show .doc-settings-box {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.doc-settings-box {
    background: var(--clr-white);
    border: 1px solid var(--sidebar-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.doc-settings-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-settings-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--clr-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #ef4444;
}

.doc-settings-body {
    padding: 25px;
    background: transparent;
}

#template-modal-textarea {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#template-modal-textarea::-webkit-scrollbar {
    display: none;
}

.doc-setting-section h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--clr-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-desc {
    font-size: 0.85rem;
    color: var(--clr-text);
    margin: 0 0 15px 0;
}

.premium-select,
.premium-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--sidebar-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--clr-dark);
    background: rgba(0, 0, 0, 0.2);
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.premium-select:focus,
.premium-input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.margin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.margin-input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--clr-text);
    margin-bottom: 6px;
    font-weight: 500;
}

.style-toggles {
    display: flex;
    gap: 15px;
}

.premium-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--sidebar-border);
    border-radius: 8px;
    transition: all 0.2s;
}

.premium-checkbox:hover {
    border-color: #cbd5e1;
}

.premium-checkbox input {
    display: none;
}

.premium-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.premium-checkbox input:checked~.checkmark {
    background: #6c5ce7;
    border-color: #6c5ce7;
}

.premium-checkbox input:checked~.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.premium-checkbox .label-text {
    font-size: 0.95rem;
    color: var(--clr-text);
}

.doc-settings-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--sidebar-border);
    background: var(--clr-white);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-doc-cancel {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--sidebar-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-doc-cancel:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn-doc-save {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(236, 72, 153, 0.3);
}

.btn-doc-save:hover {
    background: var(--gradient-primary);
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.4);
    transform: translateY(-1px);
}

/* =========================================
   PAPER SIMULATION (MS WORD STYLE)
   ========================================= */
.paper-sheet {
    background: white;
    width: 100%;
    max-width: 100%;
    /* Lebar diatur dinamis oleh JS */
    min-height: 29.7cm;
    /* Default A4, diatur JS */
    margin: 0 auto;
    /* Center horizontally */

    /* Standar margin makalah: Top 3, Bottom 3, Left 4, Right 3 */
    padding: 3cm 3cm 3cm 4cm;

    /* Photorealistic layered desk shadow */
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.02),
        0 2px 2px rgba(0, 0, 0, 0.02),
        0 4px 4px rgba(0, 0, 0, 0.03),
        0 8px 8px rgba(0, 0, 0, 0.03),
        0 16px 16px rgba(0, 0, 0, 0.04),
        0 32px 32px rgba(0, 0, 0, 0.04),
        0 64px 64px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    /* Real paper is not heavily rounded */
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;

    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    overflow: hidden;
}

.paper-sheet::before {
    content: "PREVIEW";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: clamp(6rem, 10vw, 9rem);
    font-weight: 900;
    color: rgba(0, 0, 0, 0.04);
    /* very faint, transparent */
    pointer-events: none;
    /* so it doesn't block clicking text */
    z-index: 0;
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.2em;
    font-family: var(--font-heading), sans-serif;
}

/* Paper Inner Content Formatting */
#paper-inner-content {
    width: 100%;
    position: relative;
    z-index: 1;
}

#paper-inner-content h2 {
    font-size: 12pt;
    /* Sesuai standar, bab biasanya 12pt tebal atau 14pt tebal */
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 24pt;
    page-break-before: always;
}

/* Don't break the first H2 */
#paper-inner-content h2:first-of-type {
    page-break-before: auto;
}

#paper-inner-content h3 {
    font-size: 12pt;
    font-weight: bold;
    text-align: left;
    margin-top: 18pt;
    margin-bottom: 12pt;
    text-transform: uppercase;
}

#paper-inner-content h4 {
    font-size: 12pt;
    font-weight: bold;
    text-align: left;
    margin-top: 12pt;
    margin-bottom: 12pt;
}

#paper-inner-content p {
    text-align: justify;
    margin-bottom: 0;
    text-indent: 1.27cm;
    /* Paragraf menjorok ala Word */
}

/* Tabel styles */
#paper-inner-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12pt 0;
    text-indent: 0;
    /* Reset indent for tables */
}

#paper-inner-content th,
#paper-inner-content td {
    border: 1px solid #000;
    padding: 6pt;
    text-align: left;
    font-size: 11pt;
}

#paper-inner-content th {
    background-color: #f2f2f2;
    text-align: center;
    font-weight: bold;
}

#paper-inner-content ul,
#paper-inner-content ol {
    margin-bottom: 12pt;
    padding-left: 1.27cm;
}

#paper-inner-content li {
    margin-bottom: 6pt;
    text-align: justify;
}

/* =========================================
   CHAT DOCK (FLOATING REVISION BUBBLE)
   ========================================= */
.chat-dock {
    position: fixed;
    bottom: 40px;
    /* Center in main content (compensating for 280px sidebar) */
    left: calc(50% + 140px);
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 99;
    pointer-events: none;
    /* Let clicks pass through if they miss the box */
    animation: floatUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@media (max-width: 992px) {
    .chat-dock {
        left: 50%;
        /* Sidebar is hidden on mobile */
    }
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.chat-search-box {
    display: flex;
    align-items: flex-end;
    background: var(--clr-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--sidebar-border);
    border-radius: 28px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    /* Re-enable clicks for the box itself */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.chat-search-box:focus-within {
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.chat-search-box .search-icon {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-right: 12px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.chat-search-box textarea {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 1.05rem;
    font-family: var(--font-body);
    outline: none;
    color: var(--clr-dark);
    resize: none;
    overflow-y: auto;
    max-height: 200px;
    line-height: 1.5;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-search-box textarea::-webkit-scrollbar {
    display: none;
}

.btn-submit-chat {
    border-radius: 50%;
    padding: 0;
    width: 48px;
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 4px;
}

.btn-submit-chat:hover {
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
}


/* =========================================
   LOADING STATE
   ========================================= */
.document-loading-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 50px 60px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.5);
    animation: floatGlow 4s ease-in-out infinite;
    z-index: 100;
}

@keyframes floatGlow {

    0%,
    100% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
        transform: translate(-50%, -50%);
    }

    50% {
        box-shadow: 0 25px 60px rgba(79, 70, 229, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
        transform: translate(-50%, -52%);
    }
}

.premium-loader {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 25px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-loader i {
    font-size: 2.5rem;
    color: var(--clr-primary);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin: 0;
    padding: 0;
    animation: pulseIcon 2s ease-in-out infinite;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.loader-ring:nth-child(1) {
    border-top-color: var(--clr-primary);
    animation: spin1 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-ring:nth-child(2) {
    border-right-color: var(--clr-secondary);
    animation: spin2 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    width: 80%;
    height: 80%;
}

.loader-ring:nth-child(3) {
    border-bottom-color: #6366f1;
    animation: spin3 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    width: 60%;
    height: 60%;
}

@keyframes spin1 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin2 {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes spin3 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.5));
    }

    50% {
        transform: scale(0.85);
        opacity: 0.7;
        filter: drop-shadow(0 0 2px rgba(79, 70, 229, 0.2));
    }
}

.document-loading-state h3 {
    font-size: 1.4rem;
    font-family: var(--font-primary);
    font-weight: 700;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.document-loading-state p {
    font-family: var(--font-primary);
    color: #64748b;
    font-size: 0.95rem;
}

/* =========================================
   RESPONSIVE (MOBILE SCREENS)
   ========================================= */
@media (max-width: 768px) {
    .document-toolbar {
        top: 75px;
        padding: 8px 12px 8px 16px;
        /* slightly more padding on left for the icon */
        /* Keep default flex-direction (row) */
        gap: 8px;
        border-radius: 50px;
    }

    .toolbar-title {
        font-size: 0.9rem;
        gap: 4px;
    }

    .btn-toolbar {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .chat-dock {
        bottom: 15px;
    }

    .chat-search-box {
        padding: 6px 6px 6px 16px;
    }

    .chat-search-box textarea {
        font-size: 0.95rem;
    }

    .btn-submit-chat {
        width: 40px;
        height: 40px;
        min-height: 40px;
        font-size: 1.2rem;
    }

    .document-preview-wrapper {
        padding: 80px 10px 100px 10px;
        /* Adjusted top padding to move paper up */
    }

    /* Move zoom to paper-sheet directly to avoid flex container overflow */
    #document-content {
        /* Keep flex behavior intact */
    }

    .paper-sheet {
        zoom: 0.7;
        /* Fits within 768px */
        border-radius: 4px !important;
        margin: 0 auto !important;
        padding: 3cm !important;
        /* Make inner text symmetrical */
    }
}

@media (max-width: 600px) {
    .paper-sheet {
        zoom: 0.55;
        /* 0.55 * 794 = 436px, fits within 500-600px */
    }
}

@media (max-width: 480px) {
    .paper-sheet {
        zoom: 0.45;
        /* 0.45 * 794 = 357px, fits within 380-480px */
    }

    .document-loading-state {
        padding: 30px 20px;
        width: 90%;
        border-radius: 20px;
    }

    .premium-loader {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .premium-loader i {
        font-size: 1.8rem;
    }

    .document-loading-state h3 {
        font-size: 1.1rem;
    }

    .document-loading-state p {
        font-size: 0.85rem;
    }
}

@media (max-width: 380px) {
    .paper-sheet {
        zoom: 0.38;
        /* 0.38 * 794 = 301px, fits within <380px */
    }
}

/* Fix toolbar overflow on very small screens */
@media (max-width: 480px) {
    .document-toolbar {
        width: 95%;
        padding: 8px 12px;
    }

    .toolbar-title span {
        font-size: 0.9rem;
    }

    .toolbar-title i {
        font-size: 1.4rem;
    }

    .btn-toolbar {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

/* =========================================
   PRINT MEDIA (FOR PDF EXPORT)
   ========================================= */
@media print {

    body,
    html,
    .dashboard-layout,
    .main-content,
    .viewer-container,
    .document-preview-wrapper {
        height: auto !important;
        overflow: visible !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sidebar,
    .mobile-topbar,
    .no-print,
    .chat-dock,
    .document-toolbar {
        display: none !important;
    }

    .paper-sheet {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    /* Simulate standard A4 print margins handled by browser */
    @page {
        size: A4;
        margin: 2.54cm 3cm;
    }
}

/* Fix for native select options in dark mode */
select option {
    background: var(--clr-white);
    color: var(--clr-text);
}