<style>
    body { font-family: 'Poppins', sans-serif; }
    :root {
        --sap-purple: #7d5584;
        --sap-hot-pink: #dc195f;
        --sap-pink-hover: #c01452;
        --sap-light-purple: #9370db;
        --sap-dark-purple: #663a6c;
    }
    .sidebar-icon { width: 1.25rem; height: 1.25rem; stroke-width: 2; }
    .hidden { display: none; }
    .modal-header-gradient { background: linear-gradient(90deg, var(--sap-purple) 0%, var(--sap-hot-pink) 100%); }
    
    /* Primary button classes - main theme colors */
    .btn-primary { 
        background-color: var(--sap-hot-pink); 
        color: white;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-primary:hover { background-color: var(--sap-pink-hover); }
    
    .btn-primary-large { 
        background-color: var(--sap-hot-pink); 
        color: white;
        font-weight: bold;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-primary-large:hover { background-color: var(--sap-pink-hover); }
    .btn-primary-large:disabled { background-color: #f472b6; cursor: not-allowed; }
    
    /* Secondary button - purple theme */
    .btn-secondary {
        background-color: var(--sap-purple);
        color: white;
        font-weight: bold;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-secondary:hover { background-color: var(--sap-dark-purple); }
    
    /* Tertiary button - light purple for less prominent actions */
    .btn-tertiary {
        background-color: var(--sap-light-purple);
        color: white;
        font-weight: bold;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-tertiary:hover { background-color: var(--sap-purple); }
    
    /* Neutral/Gray buttons for less important actions */
    .btn-neutral {
        background-color: #6b7280;
        color: white;
        font-weight: bold;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-neutral:hover { background-color: #4b5563; }
    
    /* Icon buttons - smaller padding */
    .btn-icon-primary {
        background-color: var(--sap-hot-pink);
        color: white;
        padding: 0.5rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-icon-primary:hover { background-color: var(--sap-pink-hover); }
    
    .btn-icon-secondary {
        background-color: var(--sap-purple);
        color: white;
        padding: 0.5rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-icon-secondary:hover { background-color: var(--sap-dark-purple); }
    
    .btn-icon-neutral {
        background-color: #6b7280;
        color: white;
        padding: 0.5rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-icon-neutral:hover { background-color: #4b5563; }
    
    /* Danger button - keep red for destructive actions */
    .btn-danger { 
        background-color: #ef4444; 
        color: white;
        font-weight: bold;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-danger:hover { background-color: #dc2626; }
    
    /* Success button - keep green for positive actions like "Convert" */
    .btn-success {
        background-color: #10b981;
        color: white;
        font-weight: bold;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
    }
    .btn-success:hover { background-color: #059669; }
    
    /* Other component classes */
    .card-white { 
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .modal-header {
        background: linear-gradient(90deg, var(--sap-purple) 0%, var(--sap-hot-pink) 100%);
        color: white;
        padding: 1rem;
        border-top-left-radius: 0.75rem;
        border-top-right-radius: 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .page-title { color: var(--sap-purple); }
    .white-butterfly { filter: brightness(0) invert(1); }
    .view-btn.active {
        background-color: var(--sap-purple);
        color: white;
    }
    .calendar-day {
        min-height: 120px;
    }
    .loading-overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(255, 255, 255, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10;
    }
    
    /* Loading Spinner - Unified style for both data loading and action loading */
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        border-top-color: #fff;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    /* --- ADDED FOR STICKY SIDEBAR --- */
    .sidebar-sticky {
        position: -webkit-sticky; /* For Safari */
        position: sticky;
        top: 0; /* Sticks to the top of the viewport */
        height: 100vh; /* Makes the sidebar the full height of the screen */
        overflow-y: auto; /* Adds a scrollbar ONLY to the sidebar if its content is too long */
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* Form section styling */
    .form-section {
        background: #f9fafb;
        padding: 1.5rem;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .form-section-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--sap-purple);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--sap-hot-pink);
    }

    /* ============================================
       STUDENT LIST PRINT STYLES
       ============================================ 
       
       POSITIONING BY CENTER POINT:
       The name's CENTER is positioned at a specific spot on the page.
       Page is 8.5" wide x 11" tall
       Measurements are from page edges (no margins)
    */
    
    :root {
        /* ========== EASY ADJUSTMENT AREA ========== */
        
        /* CENTER POINT of student name */
        --name-center-from-top: 1.9in;     /* Center point distance from TOP edge */
        --name-center-from-right: 2.89in;  /* Center point distance from RIGHT edge */
        
        /* Calculated: distance from LEFT = page width - distance from right */
        /* 8.5in - 2.89in = 5.61in */
        --name-center-from-left: 5.61in;
        
        --name-font-size: 44pt;  /* Font size */
        
        /* ========================================== */
    }
    
    /* Preload fonts */
    @font-face {
        font-family: 'Macis';
        src: url('https://r2.crm.thesapproject.com/fonts/macis-regular-4.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
        font-display: block;
    }

    @font-face {
        font-family: 'MyriadPro';
        src: url('https://r2.crm.thesapproject.com/fonts/MyriadPro-Black.otf') format('opentype');
        font-weight: 900;
        font-style: normal;
        font-display: block;
    }

    /* Print modal student list */
    .print-student-list {
        max-height: 300px;
        overflow-y: auto;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 0.5rem;
    }

    .print-student-item {
        display: flex;
        align-items: center;
        padding: 0.5rem;
        border-bottom: 1px solid #f3f4f6;
    }

    .print-student-item:last-child {
        border-bottom: none;
    }

    .print-student-item input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
        margin-right: 0.75rem;
        accent-color: var(--sap-purple);
    }

    /* Print container - hidden on screen */
    #student-print-container {
        display: none;
    }

    @media print {
        /* Hide everything by default when printing student list */
        body.printing-students * {
            visibility: hidden;
            margin: 0;
            padding: 0;
        }
        
        body.printing-students #student-print-container {
            display: block;
            visibility: visible;
            position: absolute;
            left: 0;
            top: 0;
        }
        
        body.printing-students #student-print-container * {
            visibility: visible;
        }
        
        /* Page setup - 8.5 x 11 inch (full letter) */
        body.printing-students .student-print-page {
            width: 8.5in;
            height: 11in;
            page-break-after: always;
            position: relative;
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body.printing-students .student-print-page:last-child {
            page-break-after: avoid;
        }
        
        /* Cover page styling - centered in TOP HALF of page */
        body.printing-students .cover-page {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            text-align: center;
            padding-top: 2.75in; /* Centers content in top 5.5in (half of 11in page) */
        }

        body.printing-students .cover-frame {
            border: 4pt solid #000;
            padding: 0.5in 0.75in;
            display: inline-block;
        }

        body.printing-students .cover-school-name {
            font-family: 'MyriadPro', 'Arial Black', sans-serif;
            font-size: 36pt;
            font-weight: 900;
            margin-bottom: 0.25in;
            color: #000;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }

        body.printing-students .cover-class-name {
            font-family: 'MyriadPro', 'Arial Black', sans-serif;
            font-size: 24pt;
            font-weight: 900;
            color: #000;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        
        /* STUDENT NAME - Positioned by CENTER POINT using transform */
        body.printing-students .student-name {
            position: absolute;
            /* Position at center point */
            left: var(--name-center-from-left);
            top: var(--name-center-from-top);
            /* Transform shifts element so its center is at the position */
            transform: translate(-50%, -50%);
            /* Text styling */
            font-family: 'Macis', 'Georgia', serif;
            font-size: var(--name-font-size);
            font-weight: normal;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
            margin: 0;
            padding: 0;
            color: #000;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }
        
        @page {
            size: 8.5in 11in;
            margin: 0;
        }
    }
</style>