/* -------------------------------------------------------------
 * Postural Reset HK — Unified Fallback & Print Stylesheet
 * Hand-coded native CSS properties to ensure gorgeous formatting
 * even if the Tailwind CDN fails to load on Hostinger subdomains.
 * ------------------------------------------------------------- */

/* Custom Typography & Scrollbars */
.textbook-border {
    border: 1px solid #E3DCB9;
}
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #FAF8F5;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #D6CEB4;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #0D5C4D;
}
.glassmorphism {
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(13, 92, 77, 0.2);
}

/* Custom CSS Helpers for Checkboxes and Wrappers */
.completed-checkbox-label {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    width: 100% !important;
}

/* NATIVE TAILWIND CSS FALLBACK RULES (Protects layout if CDN is offline) */
body {
    background-color: #FAF8F5 !important;
    color: #1E2530 !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.bg-clinical-charcoal { background-color: #FCFAF7 !important; }
.bg-clinical-cardBg { background-color: #FFFFFF !important; }
.bg-clinical-accentLight { background-color: #F7F5EE !important; }
.border-clinical-border { border-color: #E3DCB9 !important; }

.text-clinical-greenOptimal { color: #0D5C4D !important; }
.text-clinical-greenLight { color: #8CA38A !important; }
.text-clinical-redFacilitated { color: #AE2012 !important; }
.text-clinical-blueInhibited { color: #005F73 !important; }

.bg-clinical-greenOptimal { background-color: #0D5C4D !important; color: #FFFFFF !important; }
.bg-clinical-greenLight { background-color: #8CA38A !important; color: #FFFFFF !important; }

/* Grid & Layout Fallbacks (Strictly targets workspace main to prevent login page squishing) */
@media (min-width: 1024px) {
    main.no-print {
        display: grid !important;
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
        gap: 2rem !important;
    }
    section.lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
    section.lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
}

/* Checkbox Alignment Fixes (Scoped safely inside the workspace container) */
main.no-print label {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

/* ABSOLUTE NO-EMPTY-PAGE PRINT STYLING */
@media print {
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        display: block !important;
        position: static !important;
        overflow: visible !important;
    }
    body > *:not(#print-container) {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
    }
    #print-container {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
        box-shadow: none !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    #print-container * {
        visibility: visible !important;
        color: #000000 !important;
    }
    tr, td, th {
        page-break-inside: avoid !important;
    }
}