        :root {
            --primary: #4F46E5;
            --primary-hover: #4338ca;
            --bg-body: #F3F4F6;
            --bg-card: #ffffff;
            --text-main: #111827;
            --text-secondary: #6B7280;
            --border: #E5E7EB;
            --success: #10B981;
            --danger: #EF4444;
            --warning: #F59E0B;
            --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-family);
            background-color: var(--bg-body);
            color: var(--text-main);
            line-height: 1.5;
            padding-bottom: 4rem;
        }

        /* Layout */
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 2rem 1rem;
        }

        header {
            margin-bottom: 2rem;
            text-align: center;
        }

        h1 {
            font-size: 1.5rem;
            color: var(--text-secondary);
            font-weight: 500;
            margin-bottom: 1rem;
        }

        /* Main Stats Card */
        .stats-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 2rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            margin-bottom: 2rem;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            text-align: center;
        }

        .stat-item h2 {
            font-size: 0.875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        .stat-value {
            font-size: 3rem;
            font-weight: 700;
            color: var(--primary);
            font-variant-numeric: tabular-nums;
        }

        .stat-value.projected {
            color: var(--warning);
        }

        .stat-comparison {
            font-size: 1rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        /* Controls */
        .controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .controls-left {
            display: flex;
            gap: 0.5rem;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-weight: 500;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            gap: 0.5rem;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
        }

        .btn-secondary {
            background-color: white;
            border: 1px solid var(--border);
            color: var(--text-secondary);
        }

        .btn-secondary:hover {
            border-color: var(--text-main);
            color: var(--text-main);
        }

        .btn-danger {
            color: var(--danger);
            background: transparent;
        }

        .btn-danger:hover {
            background: #FEF2F2;
        }

        /* Semester Card */
        .semester {
            background: var(--bg-card);
            border-radius: 12px;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
            margin-bottom: 1.5rem;
            overflow: hidden;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .semester:hover {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .semester.drag-over {
            border: 2px dashed var(--primary);
            background: #F9FAFB;
        }

        .semester-header {
            padding: 1rem 1.5rem;
            background: #F9FAFB;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .semester-info {
            display: flex;
            align-items: baseline;
            gap: 1rem;
        }

        .semester-title {
            font-weight: 600;
            color: var(--text-main);
            font-size: 1rem;
        }

        .semester-gpa {
            font-size: 0.875rem;
            color: var(--text-secondary);
            font-weight: 500;
            background: #E5E7EB;
            padding: 0.125rem 0.5rem;
            border-radius: 999px;
        }

        .semester-gpa.projected {
            background: #FEF3C7;
            /* Amber-100 */
            color: #D97706;
            /* Amber-600 */
        }

        /* Course Table */
        .course-list {
            width: 100%;
            border-collapse: collapse;
        }

        .course-list th {
            text-align: left;
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 0.75rem 1.5rem;
            border-bottom: 1px solid var(--border);
        }

        .course-row td {
            padding: 0.75rem 1.5rem;
            border-bottom: 1px solid var(--border);
            vertical-align: middle;
        }

        .course-row:last-child td {
            border-bottom: none;
        }

        .course-row.hidden-course {
            opacity: 0.5;
            background-color: #F9FAFB;
            text-decoration: line-through;
        }

        .course-row.hidden-course td input,
        .course-row.hidden-course td select {
            text-decoration: none;
        }

        /* Inputs */
        input[type="text"],
        input[type="number"],
        select {
            padding: 0.4rem 0.6rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.875rem;
            width: 100%;
            font-family: inherit;
        }

        input[type="text"]:focus,
        input[type="number"]:focus,
        select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
        }

        .input-course-name {
            width: 180px;
        }

        .input-credits {
            width: 70px;
        }

        .input-grade {
            width: 80px;
        }

        /* Sticky Header */
        .sticky-header {
            position: fixed;
            top: -100px;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border);
            padding: 0.75rem 1rem;
            display: flex;
            justify-content: center;
            z-index: 50;
            transition: top 0.3s ease;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .sticky-header.visible {
            top: 0;
        }

        .sticky-content {
            width: 100%;
            max-width: 800px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 1rem;
        }

        /* Responsive Sticky Header */
        @media (max-width: 600px) {
            .sticky-header {
                padding: 0.5rem;
                /* Reduce padding */
            }

            .sticky-gpa-label {
                display: none;
                /* Hide labels "Overall GPA", "Credits" to save space */
            }

            .sticky-gpa {
                font-size: 1.2rem;
                /* Slightly smaller */
            }

            /* Hide "Import" text, show icon only */
            .sticky-content button svg+span {
                display: none;
            }

            /* Remove extra right margin from import icon when text is hidden */
            .sticky-content button svg {
                margin-right: 0 !important;
            }

            .sticky-content {
                gap: 0.5rem;
                padding: 0 0.5rem;
            }
        }

        .sticky-gpa {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
            font-variant-numeric: tabular-nums;
        }

        .sticky-gpa.projected {
            color: var(--warning);
        }

        .sticky-gpa-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-right: 0.75rem;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.05em;
        }

        /* Actions Cell */
        .actions-cell {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            justify-content: flex-end;
        }

        .action-btn {
            font-size: 0.75rem;
            border: 1px solid var(--border);
            background: white;
            padding: 2px 6px;
            border-radius: 4px;
            cursor: pointer;
            color: var(--text-secondary);
        }

        .action-btn:hover {
            border-color: var(--text-main);
            color: var(--text-main);
        }

        .action-btn.active {
            background-color: var(--warning);
            color: white;
            border-color: var(--warning);
        }

        .add-course-row {
            padding: 1rem 1.5rem;
            display: flex;
            justify-content: center;
        }

        /* Temp Grade Modal/Popover Styles */
        .temp-grade-wrapper {
            position: relative;
            display: inline-block;
        }

        .temp-grade-popup {
            position: absolute;
            bottom: 100%;
            right: 0;
            background: white;
            border: 1px solid var(--border);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            padding: 0.5rem;
            border-radius: 8px;
            width: 150px;
            z-index: 10;
            display: none;
            margin-bottom: 5px;
        }

        /* Mobile Adjustment for Popup */
        @media (max-width: 600px) {
            .temp-grade-popup {
                position: fixed;
                /* Fix to viewport */
                top: 50%;
                left: 50%;
                right: auto;
                bottom: auto;
                transform: translate(-50%, -50%);
                /* Center it */
                width: 200px;
                /* Slightly wider for ease of use */
                box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
                z-index: 1000;
                /* Ensure it's on top of everything */
            }
        }

        .temp-grade-popup.show {
            display: block;
        }

        .temp-grade-popup h4 {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
        }

        /* OCR Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .modal-header {
            margin-bottom: 1.5rem;
        }

        .modal-title {
            font-size: 1.25rem;
            font-weight: 600;
        }

        .modal-body {
            margin-bottom: 1.5rem;
        }

        .file-drop-zone {
            border: 2px dashed var(--border);
            padding: 2rem;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.2s;
        }

        .file-drop-zone:hover {
            border-color: var(--primary);
        }

        .progress-bar {
            height: 8px;
            background: #E5E7EB;
            border-radius: 4px;
            margin-top: 1rem;
            overflow: hidden;
            display: none;
        }

        .progress-fill {
            height: 100%;
            background: var(--primary);
            width: 0%;
            transition: width 0.3s;
        }

        .status-text {
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-top: 0.5rem;
            text-align: center;
        }

        /* Utility */
        .text-right {
            text-align: right;
        }

        .hidden {
            display: none;
        }

        .empty-state {
            text-align: center;
            padding: 3rem;
            color: var(--text-secondary);
        }

        /* Auth Styles */
        .auth-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 1rem;
            background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
        }

        .auth-card {
            background: var(--surface);
            padding: 2.5rem;
            border-radius: 16px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 420px;
            text-align: center;
        }

        .auth-title {
            font-size: 1.75rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--text-main);
        }

        .auth-subtitle {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 2rem;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .auth-input {
            width: 100%;
            padding: 0.85rem 1rem;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            transition: all 0.2s;
            background: #f8fafc;
        }

        .auth-input:focus {
            outline: none;
            border-color: var(--primary);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .auth-btn {
            width: 100%;
            padding: 0.85rem;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 0.5rem;
        }

        .auth-btn:hover {
            background: var(--primary-hover);
        }

        .auth-footer {
            margin-top: 1.5rem;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .auth-link {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
            cursor: pointer;
        }

        .auth-link:hover {
            text-decoration: underline;
        }

        .auth-error {
            background-color: #fee2e2;
            color: #ef4444;
            padding: 0.75rem;
            border-radius: 8px;
            font-size: 0.875rem;
            margin-bottom: 1rem;
            display: none;
        }

        /* Mobile adjustments */
        @media (max-width: 600px) {
            .stats-card {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .course-list th {
                display: none;
            }

            .course-row {
                display: flex;
                flex-wrap: wrap;
                gap: 0.5rem;
                padding: 1rem;
                border-bottom: 1px solid var(--border);
            }

            .course-row td {
                padding: 0;
                border: none;
            }

            .input-course-name {
                width: 100%;
                margin-bottom: 0.5rem;
            }

            .input-credits,
            .input-grade {
                width: auto;
                flex: 1;
            }

            .actions-cell {
                width: 100%;
                margin-top: 0.5rem;
                justify-content: space-between;
            }
        }
