        :root {
            --primary-color: #4361ee;
            --secondary-color: #3a0ca3;
            --accent-color: #4cc9f0;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --success-color: #4CAF50;
            --warning-color: #ff9800;
            --danger-color: #f44336;
            --gray-color: #6c757d;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --border-radius: 12px;
            --transition: all 0.3s ease;
            --glass-bg: rgba(255, 255, 255, 0.15);
            --glass-border: rgba(255, 255, 255, 0.2);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            color: var(--dark-color);
            line-height: 1.6;
            transition: var(--transition);
            min-height: 100vh;
            position: relative;
            font-size: 16px;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(76, 201, 240, 0.05) 100%);
            z-index: -1;
        }

        body.dark-mode {
            background: linear-gradient(135deg, #121212 0%, #1a1a2e 100%);
            color: #f0f0f0;
        }

        body.dark-mode::before {
            background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        /* Header */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
            margin-bottom: 40px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
            background: var(--glass-bg);
            border-radius: var(--border-radius);
            padding: 15px 25px;
            border: 1px solid var(--glass-border);
        }

        body.dark-mode header {
            border-bottom: 1px solid #333;
            background: rgba(30, 30, 30, 0.7);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo h1 {
            font-size: 1.8rem;
            color: var(--primary-color);
            font-weight: 700;
        }

        .logo-icon {
            width: 50px;
            height: 50px;
            background-color: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
        }

        .theme-toggle {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--gray-color);
            transition: var(--transition);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .theme-toggle:hover {
            color: var(--primary-color);
            background: rgba(67, 97, 238, 0.1);
        }

        /* Dashboard */
        .dashboard {
            text-align: center;
            margin-bottom: 60px;
        }

        .dashboard-title {
            font-size: 2.2rem;
            margin-bottom: 20px;
            color: var(--primary-color);
        }

        .dashboard-subtitle {
            font-size: 1.2rem;
            color: var(--gray-color);
            margin-bottom: 40px;
            max-width: 800px;
            margin-right: auto;
            margin-left: auto;
        }

        .bubbles-container {
            display: flex;
            justify-content: center;
            gap: 60px;
            flex-wrap: wrap;
            margin-top: 40px;
        }

        .bubble {
            width: 180px;
            height: 180px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow);
            text-decoration: none;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .bubble:hover {
            transform: translateY(-10px) scale(1.05);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
        }

        .bubble i {
            font-size: 3.5rem;
            margin-bottom: 15px;
        }

        .bubble span {
            font-size: 1.4rem;
            font-weight: 600;
        }

        .gpa-bubble {
            background: linear-gradient(135deg, #4cc9f0, #4361ee);
        }

        .absence-bubble {
            background: linear-gradient(135deg, #f72585, #3a0ca3);
        }

        /* Sections */
        .section {
            background: var(--glass-bg);
            border-radius: var(--border-radius);
            padding: 30px;
            margin-bottom: 40px;
            box-shadow: var(--shadow);
            display: none;
            backdrop-filter: blur(15px);
            border: 1px solid var(--glass-border);
        }

        body.dark-mode .section {
            background: rgba(30, 30, 30, 0.7);
        }

        .section.active {
            display: block;
            animation: slideIn 0.5s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .section-header {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .section-title {
            font-size: 1.8rem;
            color: var(--primary-color);
        }

        .back-button {
            background-color: var(--gray-color);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            min-height: 44px;
            min-width: 120px;
        }

        .back-button:hover {
            background-color: var(--dark-color);
        }

        /* GPA Options */
        .gpa-options {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 40px;
        }

        .gpa-option {
            padding: 20px 40px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: var(--transition);
            text-align: center;
            border: 2px solid transparent;
            backdrop-filter: blur(5px);
            min-height: 160px;
            min-width: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        body.dark-mode .gpa-option {
            background: rgba(45, 45, 45, 0.8);
        }

        .gpa-option:hover {
            transform: translateY(-5px);
        }

        .gpa-option.active {
            border-color: var(--primary-color);
            background: rgba(67, 97, 238, 0.15);
        }

        body.dark-mode .gpa-option.active {
            background: rgba(67, 97, 238, 0.25);
        }

        .gpa-option i {
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: var(--primary-color);
        }

        .gpa-option h3 {
            font-size: 1.5rem;
            margin-bottom: 10px;
        }

        /* Course Input Form */
        .course-form {
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(5px);
        }

        body.dark-mode .course-form {
            background: rgba(45, 45, 45, 0.8);
        }

        .form-row {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .form-group {
            flex: 1;
            min-width: 200px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--dark-color);
        }

        body.dark-mode .form-group label {
            color: #f0f0f0;
        }

        .form-control {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            font-size: 1rem;
            transition: var(--transition);
            background: rgba(255, 255, 255, 0.9);
            min-height: 48px;
        }

        body.dark-mode .form-control {
            background: rgba(61, 61, 61, 0.9);
            border-color: rgba(255, 255, 255, 0.1);
            color: #f0f0f0;
        }

        .form-control:focus {
            border-color: var(--primary-color);
            outline: none;
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .add-course-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 14px 28px;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0 auto;
            min-height: 48px;
        }

        .add-course-btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 50px 20px;
            color: var(--gray-color);
            background: rgba(255, 255, 255, 0.5);
            border-radius: var(--border-radius);
            margin: 20px 0;
            backdrop-filter: blur(5px);
        }

        body.dark-mode .empty-state {
            background: rgba(45, 45, 45, 0.5);
        }

        .empty-state i {
            font-size: 4rem;
            margin-bottom: 20px;
            color: var(--primary-color);
            opacity: 0.7;
        }

        .empty-state h3 {
            font-size: 1.5rem;
            margin-bottom: 10px;
            color: var(--dark-color);
        }

        body.dark-mode .empty-state h3 {
            color: #f0f0f0;
        }

        /* Courses List - Sortable */
        .courses-list {
            margin-bottom: 30px;
        }

        .courses-list h3 {
            margin-bottom: 20px;
            color: var(--primary-color);
        }

        .courses-container {
            position: relative;
        }

        .course-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            margin-bottom: 15px;
            box-shadow: var(--shadow);
            transition: var(--transition);
            backdrop-filter: blur(5px);
            cursor: grab;
            touch-action: manipulation;
        }

        .course-item:active {
            cursor: grabbing;
        }

        .course-item.sortable-chosen {
            box-shadow: 0 0 20px rgba(67, 97, 238, 0.3);
            border: 2px solid var(--primary-color);
        }

        .course-item.sortable-ghost {
            opacity: 0.4;
            background: rgba(67, 97, 238, 0.1);
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        body.dark-mode .course-item {
            background: rgba(45, 45, 45, 0.8);
        }

        .course-item:hover {
            transform: translateX(-5px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        .course-info {
            display: flex;
            gap: 20px;
            align-items: center;
            flex: 1;
        }

        .course-name {
            font-weight: 600;
            font-size: 1.1rem;
            min-width: 150px;
            flex: 1;
        }

        .course-hours, .course-grade {
            background: rgba(240, 240, 240, 0.7);
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 600;
            backdrop-filter: blur(5px);
            min-width: 80px;
            text-align: center;
        }

        body.dark-mode .course-hours, body.dark-mode .course-grade {
            background: rgba(61, 61, 61, 0.7);
        }

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

        .action-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            color: var(--gray-color);
            transition: var(--transition);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            touch-action: manipulation;
        }

        .action-btn:hover {
            color: var(--primary-color);
            background: rgba(67, 97, 238, 0.1);
        }

        body.dark-mode .action-btn:hover {
            background: rgba(67, 97, 238, 0.2);
        }

        .drag-handle {
            cursor: grab;
            color: var(--gray-color);
            padding: 0 10px;
            display: flex;
            align-items: center;
        }

        .drag-handle:active {
            cursor: grabbing;
        }

        /* Previous GPA Input */
        .previous-gpa {
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(5px);
        }

        body.dark-mode .previous-gpa {
            background: rgba(45, 45, 45, 0.8);
        }

        /* Target GPA */
        .target-gpa {
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(5px);
        }

        body.dark-mode .target-gpa {
            background: rgba(45, 45, 45, 0.8);
        }

        .target-result {
            background: rgba(67, 97, 238, 0.1);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-top: 20px;
            border-right: 4px solid var(--primary-color);
            animation: fadeIn 0.5s ease;
        }

        body.dark-mode .target-result {
            background: rgba(67, 97, 238, 0.2);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Calculate Button */
        .calculate-container {
            text-align: center;
            margin-top: 40px;
        }

        .calculate-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 16px 48px;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 1.2rem;
            font-weight: 600;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
            min-height: 56px;
            min-width: 200px;
        }

        .calculate-btn::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5px;
            height: 5px;
            background: rgba(255, 255, 255, 0.5);
            opacity: 0;
            border-radius: 100%;
            transform: scale(1, 1) translate(-50%);
            transform-origin: 50% 50%;
        }

        .calculate-btn:focus:not(:active)::after {
            animation: ripple 1s ease-out;
        }

        @keyframes ripple {
            0% {
                transform: scale(0, 0);
                opacity: 0.5;
            }
            100% {
                transform: scale(20, 20);
                opacity: 0;
            }
        }

        .calculate-btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        .calculate-btn:disabled {
            background-color: var(--gray-color);
            cursor: not-allowed;
            transform: none;
        }

        /* Results */
        .results-container {
            text-align: center;
            margin-top: 40px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            display: none;
            backdrop-filter: blur(5px);
            animation: fadeIn 0.5s ease;
        }

        body.dark-mode .results-container {
            background: rgba(45, 45, 45, 0.8);
        }

        .results-container.active {
            display: block;
        }

        .gpa-result {
            font-size: 3.5rem;
            font-weight: 700;
            color: var(--primary-color);
            margin: 20px 0;
            font-variant-numeric: tabular-nums;
        }

        .gpa-scale {
            color: var(--gray-color);
            margin-bottom: 20px;
        }

        .export-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        .export-btn {
            background: rgba(255, 255, 255, 0.9);
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            backdrop-filter: blur(5px);
            min-height: 48px;
        }

        body.dark-mode .export-btn {
            background: rgba(61, 61, 61, 0.9);
        }

        .export-btn:hover {
            background-color: var(--primary-color);
            color: white;
            transform: translateY(-2px);
        }

        /* Charts Container */
        .charts-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 30px;
            margin: 40px 0;
        }

        .chart-box {
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            padding: 25px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(5px);
            height: 350px;
            display: flex;
            flex-direction: column;
        }

        body.dark-mode .chart-box {
            background: rgba(45, 45, 45, 0.8);
        }

        .chart-title {
            font-size: 1.3rem;
            color: var(--primary-color);
            margin-bottom: 20px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .chart-wrapper {
            flex: 1;
            position: relative;
        }

        /* Absence Calculator */
        .absence-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-bottom: 40px;
        }

        .absence-inputs, .absence-tracking, .absence-dates, .absence-prediction {
            background: rgba(255, 255, 255, 0.8);
            border-radius: var(--border-radius);
            padding: 25px;
            box-shadow: var(--shadow);
            backdrop-filter: blur(5px);
        }

        body.dark-mode .absence-inputs, 
        body.dark-mode .absence-tracking,
        body.dark-mode .absence-dates,
        body.dark-mode .absence-prediction {
            background: rgba(45, 45, 45, 0.8);
        }

        .counter {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin: 20px 0;
        }

        .counter-btn {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background-color: var(--primary-color);
            color: white;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .counter-btn:hover {
            background-color: var(--secondary-color);
            transform: scale(1.1);
        }

        .counter-value {
            font-size: 2.5rem;
            font-weight: 700;
            min-width: 80px;
            text-align: center;
            font-variant-numeric: tabular-nums;
        }

        .progress-container {
            margin-top: 30px;
        }

        .progress-bar {
            height: 25px;
            background: rgba(224, 224, 224, 0.7);
            border-radius: 15px;
            overflow: hidden;
            margin-bottom: 10px;
            position: relative;
        }

        body.dark-mode .progress-bar {
            background: rgba(61, 61, 61, 0.7);
        }

        .progress-fill {
            height: 100%;
            background-color: var(--success-color);
            border-radius: 15px;
            width: 0%;
            transition: width 0.5s ease;
        }

        .progress-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: var(--gray-color);
        }

        .warning-indicator {
            height: 5px;
            background-color: var(--danger-color);
            position: relative;
            margin-top: 5px;
        }

        .warning-label {
            position: absolute;
            top: -25px;
            transform: translateX(-50%);
            font-size: 0.8rem;
            color: var(--danger-color);
            font-weight: 600;
        }

        /* Absence Dates */
        .absence-dates-list {
            max-height: 200px;
            overflow-y: auto;
            margin-top: 15px;
        }

        .date-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: rgba(240, 240, 240, 0.5);
            border-radius: 8px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: var(--transition);
        }

        .date-item:hover {
            background: rgba(240, 240, 240, 0.7);
            transform: translateX(-3px);
        }

        body.dark-mode .date-item {
            background: rgba(61, 61, 61, 0.5);
        }

        body.dark-mode .date-item:hover {
            background: rgba(61, 61, 61, 0.7);
        }

        .add-date-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 15px;
            min-height: 44px;
        }

        .add-date-btn:hover {
            background-color: var(--secondary-color);
        }

        /* Can I Absent Button */
        .can-absent-btn {
            background: linear-gradient(135deg, #4cc9f0, #4361ee);
            color: white;
            border: none;
            padding: 14px 28px;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 20px auto;
            min-height: 48px;
        }

        .can-absent-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        /* Prediction Result */
        .prediction-result {
            background: rgba(67, 97, 238, 0.1);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-top: 20px;
            text-align: center;
            animation: fadeIn 0.5s ease;
        }

        body.dark-mode .prediction-result {
            background: rgba(67, 97, 238, 0.2);
        }

        /* Toasts */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
        }

        .toast {
            background: rgba(255, 255, 255, 0.95);
            border-radius: var(--border-radius);
            padding: 15px 20px;
            margin-bottom: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            gap: 15px;
            min-width: 300px;
            max-width: 400px;
            transform: translateX(100%);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            backdrop-filter: blur(10px);
        }

        body.dark-mode .toast {
            background: rgba(30, 30, 30, 0.95);
        }

        .toast.show {
            transform: translateX(0);
            opacity: 1;
        }

        .toast.success {
            border-right: 4px solid var(--success-color);
        }

        .toast.warning {
            border-right: 4px solid var(--warning-color);
        }

        .toast.error {
            border-right: 4px solid var(--danger-color);
        }

        .toast.info {
            border-right: 4px solid var(--primary-color);
        }

        .toast-icon {
            font-size: 1.5rem;
        }

        .toast.success .toast-icon {
            color: var(--success-color);
        }

        .toast.warning .toast-icon {
            color: var(--warning-color);
        }

        .toast.error .toast-icon {
            color: var(--danger-color);
        }

        .toast.info .toast-icon {
            color: var(--primary-color);
        }

        .toast-content {
            flex: 1;
        }

        .toast-title {
            font-weight: 600;
            margin-bottom: 5px;
        }

        .toast-message {
            font-size: 0.9rem;
            color: var(--gray-color);
        }

        .toast-close {
            background: none;
            border: none;
            color: var(--gray-color);
            cursor: pointer;
            font-size: 1.2rem;
            transition: var(--transition);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .toast-close:hover {
            color: var(--dark-color);
            background: rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .toast-close:hover {
            color: #f0f0f0;
            background: rgba(255, 255, 255, 0.1);
        }

        /* Custom Modal */
        .custom-modal {
            display: none;
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            backdrop-filter: blur(5px);
        }

        .custom-modal.active {
            display: flex;
            animation: fadeIn 0.3s ease;
        }

        .custom-modal-content {
            background: rgba(255, 255, 255, 0.95);
            border-radius: var(--border-radius);
            padding: 30px;
            max-width: 500px;
            width: 100%;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            transform: scale(0.9);
            transition: transform 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .custom-modal.active .custom-modal-content {
            transform: scale(1);
        }

        body.dark-mode .custom-modal-content {
            background: rgba(30, 30, 30, 0.95);
        }

        .custom-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .custom-modal-header {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .custom-modal-title {
            font-size: 1.5rem;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .custom-modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--gray-color);
            transition: var(--transition);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .custom-modal-close:hover {
            color: var(--dark-color);
            background: rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .custom-modal-close:hover {
            color: #f0f0f0;
            background: rgba(255, 255, 255, 0.1);
        }

        .custom-modal-body {
            margin-bottom: 25px;
            line-height: 1.6;
        }

        .custom-modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
        }

        .modal-btn {
            padding: 12px 28px;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            border: none;
            min-width: 100px;
            min-height: 44px;
        }

        .modal-btn.cancel {
            background-color: #f0f0f0;
            color: var(--dark-color);
        }

        body.dark-mode .modal-btn.cancel {
            background-color: #3d3d3d;
            color: #f0f0f0;
        }

        .modal-btn.confirm {
            background-color: var(--danger-color);
            color: white;
        }

        .modal-btn.confirm:hover {
            background-color: #d32f2f;
        }

        .modal-icon {
            text-align: center;
            font-size: 3rem;
            color: var(--danger-color);
            margin-bottom: 15px;
            animation: shake 0.5s ease infinite;
        }

        @keyframes shake {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-10deg); }
            75% { transform: rotate(10deg); }
        }

        /* Help Modal */
        .help-modal {
            display: none;
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            backdrop-filter: blur(5px);
        }

        .help-modal.active {
            display: flex;
            animation: fadeIn 0.3s ease;
        }

        .help-modal-content {
            background: rgba(255, 255, 255, 0.95);
            border-radius: var(--border-radius);
            padding: 30px;
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(10px);
        }

        body.dark-mode .help-modal-content {
            background: rgba(30, 30, 30, 0.95);
        }

        .help-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .help-modal-header {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .help-modal-title {
            font-size: 1.5rem;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .help-modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--gray-color);
            transition: var(--transition);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .help-modal-close:hover {
            color: var(--dark-color);
            background: rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .help-modal-close:hover {
            color: #f0f0f0;
            background: rgba(255, 255, 255, 0.1);
        }

        .help-modal-body {
            line-height: 1.8;
        }

        .help-modal-body h3 {
            margin: 20px 0 10px;
            color: var(--primary-color);
        }

        .example {
            background: rgba(248, 249, 250, 0.5);
            padding: 15px;
            border-radius: 8px;
            margin: 15px 0;
            border-right: 4px solid var(--primary-color);
            backdrop-filter: blur(5px);
        }

        body.dark-mode .example {
            background: rgba(61, 61, 61, 0.5);
        }

        /* Install PWA Button */
        .install-pwa-btn {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            z-index: 100;
            display: none;
            min-height: 44px;
        }

        .install-pwa-btn:hover {
            background: var(--secondary-color);
            transform: translateY(-2px);
        }

        /* Footer */
        footer {
            text-align: center;
            padding: 30px 0;
            margin-top: 60px;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            color: var(--gray-color);
        }

        body.dark-mode footer {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .bubbles-container {
                gap: 30px;
            }
            
            .bubble {
                width: 150px;
                height: 150px;
            }
            
            .bubble i {
                font-size: 2.8rem;
            }
            
            .section {
                padding: 20px;
            }
            
            .gpa-options {
                flex-direction: column;
                align-items: center;
            }
            
            .gpa-option {
                width: 100%;
                max-width: 300px;
            }
            
            .absence-form {
                grid-template-columns: 1fr;
            }
            
            .charts-container {
                grid-template-columns: 1fr;
            }
            
            .chart-box {
                height: 300px;
            }
            
            .export-buttons {
                flex-direction: column;
                align-items: center;
            }
            
            .export-btn {
                width: 100%;
                max-width: 300px;
                justify-content: center;
            }
            
            .install-pwa-btn {
                bottom: 10px;
                left: 10px;
                right: 10px;
                justify-content: center;
            }
            
            .toast {
                min-width: auto;
                max-width: calc(100vw - 40px);
            }
            
            .course-info {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .course-hours, .course-grade {
                align-self: flex-start;
            }
            
            .form-control {
                font-size: 16px; /* Prevents zoom on iOS */
            }
        }
        
        @media (max-width: 480px) {
            .container {
                padding: 10px;
            }
            
            header {
                padding: 15px;
            }
            
            .logo h1 {
                font-size: 1.5rem;
            }
            
            .dashboard-title {
                font-size: 1.8rem;
            }
            
            .section-title {
                font-size: 1.5rem;
            }
            
            .bubble {
                width: 130px;
                height: 130px;
            }
            
            .bubble i {
                font-size: 2.5rem;
            }
            
            .bubble span {
                font-size: 1.2rem;
            }
        }
        
        /* Print Styles */
        @media print {
            header, footer, .back-button, .export-buttons, .install-pwa-btn, .theme-toggle {
                display: none !important;
            }
            
            .section {
                box-shadow: none;
                border: 1px solid #ddd;
            }
            
            .results-container {
                box-shadow: none;
                border: 2px solid #000;
                break-inside: avoid;
            }
        }

/* ===== Skip Navigation (Accessibility) ===== */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-size: 1rem;
    text-decoration: none;
    transition: top 0.3s;
}
.skip-nav:focus {
    top: 0;
}

/* ===== Footer Links ===== */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}
.footer-links a:hover {
    background: rgba(67, 97, 238, 0.1);
    text-decoration: underline;
}
body.dark-mode .footer-links a {
    color: var(--accent-color);
}
body.dark-mode .footer-links a:hover {
    background: rgba(76, 201, 240, 0.1);
}
.hero-subtitle {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: 5px;
}
.empty-dates {
    margin-top: 20px;
    padding: 20px;
}
.footer-tagline {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* ===== SEO Content Section ===== */
.seo-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 40px;
    box-shadow: var(--shadow);
    text-align: right;
    line-height: 1.9;
}
.seo-content h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
}
.seo-content h3 {
    color: var(--secondary-color);
    font-size: 1.15rem;
    margin-top: 20px;
    margin-bottom: 8px;
}
.seo-content p {
    color: #555;
    font-size: 1rem;
}
body.dark-mode .seo-content {
    background: #2d2d2d;
}
body.dark-mode .seo-content h2 {
    color: var(--accent-color);
}
body.dark-mode .seo-content h3 {
    color: #b8b8ff;
}
body.dark-mode .seo-content p {
    color: #ccc;
}

/* ===== Blog Highlights ===== */
.blog-highlights {
    margin-top: 40px;
}
.blog-highlights > h2 {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 25px;
}
.blog-highlights > h2 i {
    margin-left: 8px;
    color: var(--primary-color);
}
body.dark-mode .blog-highlights > h2 {
    color: #e0e0e0;
}
.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}
.blog-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 1.3rem;
}
.blog-card h3 {
    color: var(--dark-color);
    font-size: 1.05rem;
    margin-bottom: 8px;
}
.blog-card p {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.6;
}
body.dark-mode .blog-card {
    background: #2d2d2d;
}
body.dark-mode .blog-card h3 {
    color: #e0e0e0;
}
body.dark-mode .blog-card:hover {
    border-color: var(--accent-color);
}
.view-all-blog {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}
.view-all-blog:hover {
    text-decoration: underline;
}
.view-all-blog i {
    margin-right: 5px;
}
body.dark-mode .view-all-blog {
    color: var(--accent-color);
}

/* ===== Page Template Styles (for blog, legal, about pages) ===== */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}
.page-header {
    text-align: center;
    padding: 40px 0 30px;
    border-bottom: 2px solid rgba(67, 97, 238, 0.15);
    margin-bottom: 30px;
}
.page-header .logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.page-header .logo-icon-sm {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}
.page-header .logo-text {
    color: var(--dark-color);
    font-size: 1.2rem;
    font-weight: 700;
}
body.dark-mode .page-header .logo-text {
    color: #e0e0e0;
}
.page-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 10px;
}
body.dark-mode .page-header h1 {
    color: var(--accent-color);
}
.page-header .last-updated {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 8px;
}
.page-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow);
    line-height: 2;
    text-align: right;
}
.page-content h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
}
.page-content h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 8px;
}
.page-content p {
    color: #444;
    margin-bottom: 12px;
}
.page-content ul, .page-content ol {
    padding-right: 25px;
    margin-bottom: 15px;
}
.page-content li {
    margin-bottom: 6px;
    color: #444;
}
body.dark-mode .page-content {
    background: #2d2d2d;
}
body.dark-mode .page-content h2 {
    color: var(--accent-color);
    border-bottom-color: rgba(76, 201, 240, 0.2);
}
body.dark-mode .page-content h3 {
    color: #b8b8ff;
}
body.dark-mode .page-content p,
body.dark-mode .page-content li {
    color: #ccc;
}
.page-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--gray-color);
}
body.dark-mode .page-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}
.page-footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.page-footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}
.page-footer-links a:hover {
    text-decoration: underline;
}
body.dark-mode .page-footer-links a {
    color: var(--accent-color);
}

/* Blog Index Page */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.blog-list-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.blog-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.blog-list-icon {
    width: 55px;
    height: 55px;
    min-width: 55px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}
.blog-list-content h3 {
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.blog-list-content p {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.6;
}
.blog-list-date {
    color: var(--gray-color);
    font-size: 0.8rem;
    margin-top: 6px;
}
body.dark-mode .blog-list-item {
    background: #2d2d2d;
}
body.dark-mode .blog-list-content h3 {
    color: #e0e0e0;
}

/* Article Styles */
.article-meta {
    display: flex;
    gap: 15px;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.article-meta i {
    margin-left: 5px;
}
.article-content {
    line-height: 2.1;
}
.article-content p {
    margin-bottom: 15px;
}
/* Related Articles */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}
.related-articles h3 {
    font-size: 1.3rem;
    color: #4361ee;
    margin-bottom: 1rem;
}
.related-articles h3 i {
    margin-left: 0.5rem;
}
.related-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.related-card {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.related-card:hover {
    border-color: #4361ee;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}
.related-card i {
    font-size: 1.3rem;
    color: #4361ee;
    flex-shrink: 0;
}
.related-card span {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}
body.dark-mode .related-articles {
    border-top-color: #333;
}
body.dark-mode .related-card {
    background: #1e1e1e;
    color: #e0e0e0;
}
body.dark-mode .related-card:hover {
    border-color: #4361ee;
    background: #252525;
}
@media (max-width: 480px) {
    .related-cards {
        flex-direction: column;
    }
}

.article-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 30px;
}
.article-cta h3 {
    color: white !important;
    margin-bottom: 10px;
}
.article-cta a {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    transition: var(--transition);
}
.article-cta a:hover {
    transform: scale(1.05);
}
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
body.dark-mode .breadcrumb a {
    color: var(--accent-color);
}
.breadcrumb .separator {
    color: var(--gray-color);
}

@media (max-width: 768px) {
    .blog-cards {
        grid-template-columns: 1fr;
    }
    .blog-list-item {
        flex-direction: column;
    }
    .page-content {
        padding: 20px;
    }
    .page-header h1 {
        font-size: 1.4rem;
    }
}

@media print {
    .page-header .logo-link,
    .page-footer-links,
    .skip-nav {
        display: none !important;
    }
}

/* ===== New Absence Tracker Grid ===== */
.absence-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.absence-panel {
    background: var(--card-bg, rgba(255,255,255,0.05));
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
}

.dark-mode .absence-panel {
    background: rgba(30, 30, 50, 0.7);
    border-color: rgba(255,255,255,0.08);
}

.absence-panel-main {
    text-align: center;
}

.panel-title {
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-subtitle {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.absence-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
}

.counter-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: white;
}

.counter-plus {
    background: #4361ee;
}

.counter-plus:hover {
    background: #3451de;
    transform: scale(1.1);
}

.counter-minus {
    background: #4361ee;
}

.counter-minus:hover {
    background: #3451de;
    transform: scale(1.1);
}

.counter-value {
    font-size: 3rem;
    font-weight: 700;
    min-width: 60px;
}

.absence-progress-section {
    margin: 20px 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #aaa;
}

.absence-progress-bar {
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: visible;
    position: relative;
}

.absence-progress-fill {
    height: 100%;
    border-radius: 6px;
    background: #4CAF50;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.absence-limit-marker {
    position: absolute;
    left: 25%;
    top: -6px;
    bottom: -6px;
    width: 2px;
    background: #F44336;
}

.limit-label {
    position: absolute;
    top: -32px;
    right: -30px;
    font-size: 0.7rem;
    color: #F44336;
    white-space: nowrap;
}

.progress-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #888;
    direction: ltr;
}

.absence-status-msg {
    padding: 12px 20px;
    border-radius: 12px;
    margin: 16px 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    background: #4CAF50;
}

.can-absent-btn {
    background: linear-gradient(135deg, #F44336, #E91E63);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.can-absent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.prediction-result {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.absence-info-box {
    margin-top: 16px;
    padding: 14px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.8;
}

.absence-info-box strong {
    color: #4361ee;
}

.add-date-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed rgba(67, 97, 238, 0.4);
    border-radius: 12px;
    background: transparent;
    color: #4361ee;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
}

.add-date-btn:hover {
    background: rgba(67, 97, 238, 0.1);
    border-color: #4361ee;
}

.dates-list {
    max-height: 200px;
    overflow-y: auto;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.04);
    font-size: 0.85rem;
}

.empty-dates-state {
    text-align: center;
    padding: 24px;
    color: #888;
}

.empty-dates-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #555;
}

.empty-dates-state h4 {
    margin-bottom: 4px;
}

.empty-dates-state p {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .absence-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Quick Stats on Dashboard ===== */
.quick-stats {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.quick-stat-card {
    flex: 1;
    min-width: 200px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.dark-mode .quick-stat-card {
    background: rgba(30, 30, 50, 0.5);
}

.quick-stat-card i {
    font-size: 1.5rem;
    color: #4361ee;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4361ee;
}

.stat-desc {
    font-size: 0.85rem;
    color: #aaa;
}

.motivational-quote {
    font-style: italic;
    line-height: 1.6;
    font-size: 0.9rem !important;
}

/* ===== Social Share Buttons ===== */
.share-results {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.share-btn {
    padding: 10px 18px;
    border-radius: 25px;
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.share-twitter {
    background: #000;
}

.share-whatsapp {
    background: #25D366;
}

.share-copy {
    background: #4361ee;
}

/* ========== FAQ Section ========== */
.faq-section {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .faq-section {
    background: rgba(30, 30, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
}

.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 700;
}

.faq-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

body.dark-mode .faq-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(40, 40, 40, 0.5);
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(67, 97, 238, 0.15);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    text-align: right;
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: rgba(67, 97, 238, 0.05);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-right: 10px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 20px 16px;
}

.faq-answer p {
    line-height: 1.8;
    color: var(--gray-color);
    font-size: 0.95rem;
}

body.dark-mode .faq-answer p {
    color: #bbb;
}

/* ========== Improved Absence Status Messages ========== */
.absence-status-msg {
    padding: 14px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 15px 0;
    transition: all 0.4s ease;
}

.status-safe {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

body.dark-mode .status-safe {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.2) 0%, rgba(76, 175, 80, 0.15) 100%);
    color: #81c784;
    border-color: rgba(76, 175, 80, 0.3);
}

.status-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border: 1px solid #ffcc02;
    animation: pulse-warning 2s infinite;
}

body.dark-mode .status-warning {
    background: linear-gradient(135deg, rgba(230, 81, 0, 0.2) 0%, rgba(255, 152, 0, 0.15) 100%);
    color: #ffb74d;
    border-color: rgba(255, 152, 0, 0.3);
}

.status-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #ef9a9a;
    animation: pulse-danger 1.5s infinite;
}

body.dark-mode .status-danger {
    background: linear-gradient(135deg, rgba(198, 40, 40, 0.2) 0%, rgba(244, 67, 54, 0.15) 100%);
    color: #ef9a9a;
    border-color: rgba(244, 67, 54, 0.3);
}

@keyframes pulse-warning {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 152, 0, 0); }
}

@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(244, 67, 54, 0); }
}

/* ========== Improved Absence Info Box ========== */
.absence-info-box .info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .absence-info-box .info-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.absence-info-box .info-row:last-child {
    border-bottom: none;
}

.absence-info-box .info-row i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.absence-info-box .info-row strong {
    margin-right: auto;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ========== Improved Absence Counter ========== */
.absence-counter-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.counter-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.percentage-display {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
}

/* ========== Improved Prediction Result ========== */
.prediction-result {
    padding: 15px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.08) 0%, rgba(76, 201, 240, 0.08) 100%);
    border: 1px solid rgba(67, 97, 238, 0.15);
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}

body.dark-mode .prediction-result {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.15) 0%, rgba(76, 201, 240, 0.1) 100%);
    border-color: rgba(67, 97, 238, 0.25);
}

.prediction-result p {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--primary-color);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Improved Can Absent Button ========== */
.can-absent-btn {
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.can-absent-btn:hover {
    background: var(--primary-color);
    color: white;
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

/* ========== Improved Add Date Button ========== */
.add-date-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.add-date-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* ========== Improved Date Items ========== */
.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-top: 8px;
    background: rgba(67, 97, 238, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

body.dark-mode .date-item {
    background: rgba(67, 97, 238, 0.12);
    border-color: rgba(67, 97, 238, 0.2);
}

.date-item:hover {
    background: rgba(67, 97, 238, 0.12);
}

/* ========== Empty Dates State ========== */
.empty-dates-state {
    text-align: center;
    padding: 30px 15px;
    color: var(--gray-color);
}

.empty-dates-state i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: rgba(67, 97, 238, 0.3);
}

.empty-dates-state h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.empty-dates-state p {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========== SEO Content Improvements ========== */
.seo-content h3 {
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.15rem;
}
