
        * { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            --primary: #0F68C9;
            --primary-dark: #084C91;
            --primary-soft: #37A7FF;
            --success: #18C6A3;
            --success-dark: #0E8F7D;
            --warning: #2AA9C9;
            --danger: #0B7FAE;
            --dark: #073047;
            --darker: #041B2A;
            --gray: #A8C7D8;
            --info: #20A4D8;
            --surface: rgba(255,255,255,0.07);
            --surface-strong: rgba(255,255,255,0.11);
            --line: rgba(55,167,255,0.18);
            --brand-gradient: linear-gradient(135deg, #0F68C9 0%, #37A7FF 48%, #18C6A3 100%);
            --brand-gradient-dark: linear-gradient(135deg, #084C91 0%, #0F68C9 52%, #0E8F7D 100%);
        }

        body {
            font-family: 'Segoe UI', Tahoma, sans-serif;
            background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
            min-height: 100vh;
            color: #fff;
        }

        /* نظام الإشعارات */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(10px);
            border-radius: 10px;
            padding: 15px 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            z-index: 10000;
            animation: slideIn 0.3s ease;
            color: #333;
            max-width: 300px;
        }

        .notification-success { border-left: 4px solid var(--success); }
        .notification-error { border-left: 4px solid var(--danger); }
        .notification-warning { border-left: 4px solid var(--warning); }
        .notification-info { border-left: 4px solid var(--info); }

        .notification-content {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .notification-close {
            background: none;
            border: none;
            font-size: 1.2em;
            cursor: pointer;
            color: #666;
            margin-left: auto;
        }

        @keyframes slideIn {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            right: 0;
            top: 0;
            width: 280px;
            height: 100vh;
            background: rgba(255,255,255,0.05);
            backdrop-filter: blur(20px);
            border-left: 1px solid rgba(255,255,255,0.1);
            padding: 20px;
            overflow-y: auto;
            z-index: 100;
        }

        .sidebar-header {
            text-align: center;
            padding: 20px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 20px;
        }

        .sidebar-header .logo { font-size: 3em; margin-bottom: 10px; }
        .sidebar-header h2 {
            font-size: 1.2em;
            background: linear-gradient(135deg, var(--primary), var(--success));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-section { margin-bottom: 25px; }
        .nav-section-title {
            font-size: 0.8em;
            color: var(--gray);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 10px;
            padding-right: 10px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            margin-bottom: 5px;
            color: var(--gray);
        }

        .nav-item:hover {
            background: rgba(255,255,255,0.1);
            color: #fff;
        }

        .nav-item.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: #fff;
        }

        .nav-item .icon { font-size: 1.2em; }
        .nav-item .badge-count {
            margin-right: auto;
            background: var(--danger);
            color: #fff;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.8em;
        }


        .current-student-sidebar {
            margin: 8px 0 12px;
            padding: 10px 12px;
            border-radius: 12px;
            background: rgba(14, 165, 233, 0.10);
            border: 1px solid rgba(14, 165, 233, 0.28);
            cursor: pointer;
            transition: all 0.25s ease;
        }

        .current-student-sidebar:hover {
            background: rgba(14, 165, 233, 0.16);
            border-color: rgba(14, 165, 233, 0.45);
        }

        .current-student-sidebar .current-student-label {
            display: block;
            color: var(--gray);
            font-size: 0.78em;
            margin-bottom: 4px;
        }

        .current-student-sidebar strong {
            display: block;
            color: #fff;
            font-size: 0.95em;
            line-height: 1.5;
            white-space: normal;
            word-break: break-word;
        }

        /* Main Content */
        .main-content {
            margin-right: 280px;
            padding: 30px;
            min-height: 100vh;
        }

        .page {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .page.active { display: block; }

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

        .page-header { margin-bottom: 30px; }
        .page-header h1 { font-size: 2em; margin-bottom: 10px; }
        .page-header p { color: var(--gray); }

        /* Cards */
        .card {
            background: rgba(255,255,255,0.05);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 20px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.1);
        }

        .card-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .card-header .icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary), var(--success));
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5em;
        }

        /* Forms */
        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .form-group { margin-bottom: 15px; }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--gray);
            font-size: 0.9em;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px 15px;
            background: rgba(255,255,255,0.08);
            border: 2px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            color: #fff;
            font-size: 1em;
            transition: all 0.3s;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: var(--primary);
            outline: none;
        }

        .form-group select option {
            background: var(--dark);
            color: #fff;
        }

        .form-group input:disabled,
        .form-group select:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* Buttons */
        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 10px;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
        .btn-success { background: linear-gradient(135deg, var(--success), #0E8F7D); color: #fff; }
        .btn-warning { background: linear-gradient(135deg, var(--warning), #0B7FAE); color: #fff; }
        .btn-danger { background: linear-gradient(135deg, var(--danger), #064D73); color: #fff; }
        .btn-info { background: linear-gradient(135deg, var(--info), #0284c7); color: #fff; }
        .btn-sm { padding: 8px 15px; font-size: 0.9em; }

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

        /* Stats */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: rgba(255,255,255,0.05);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .stat-card .icon { font-size: 2.5em; margin-bottom: 10px; }
        .stat-card .value { font-size: 2.5em; font-weight: bold; margin-bottom: 5px; }
        .stat-card .label { color: var(--gray); font-size: 0.9em; }

        .stat-card.success { border-color: var(--success); }
        .stat-card.success .value { color: var(--success); }
        .stat-card.danger { border-color: var(--danger); }
        .stat-card.danger .value { color: var(--danger); }
        .stat-card.primary { border-color: var(--primary); }
        .stat-card.primary .value { color: var(--primary); }
        .stat-card.neutral { border-color: var(--gray); }
        .stat-card.neutral .value { color: var(--gray); }

        /* Progress */
        .progress-container { margin-bottom: 25px; }
        .progress-header { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--gray); }
        .progress-bar { height: 12px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; }
        .progress-fill {
            height: 100%;
            background: linear-gradient(135deg, var(--primary), var(--success));
            border-radius: 10px;
            transition: width 0.5s ease;
        }

        /* Test Items */
        .test-item-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            gap: 12px;
            margin: 20px 0;
        }

        .test-item {
            background: rgba(255,255,255,0.08);
            padding: 15px;
            border-radius: 12px;
            text-align: center;
            font-size: 1.3em;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .test-item:hover { background: rgba(255,255,255,0.15); }
        .test-item.correct { border-color: var(--success); background: rgba(24, 198, 163, 0.2); }

        /* Tables */
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th, .data-table td {
            padding: 15px;
            text-align: right;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .data-table th { background: rgba(255,255,255,0.05); color: var(--gray); font-weight: 600; }
        .data-table tr:hover { background: rgba(255,255,255,0.03); }

        /* Badges */
        .badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.85em;
            font-weight: 600;
        }

        .badge-success { background: rgba(24, 198, 163, 0.2); color: var(--success); }
        .badge-danger { background: rgba(11, 127, 174, 0.2); color: var(--danger); }
        .badge-warning { background: rgba(42, 169, 201, 0.2); color: var(--warning); }
        .badge-primary { background: rgba(15, 104, 201, 0.2); color: var(--primary); }
        .badge-info { background: rgba(32, 164, 216, 0.2); color: var(--info); }
        .badge-neutral { background: rgba(148, 163, 184, 0.2); color: var(--gray); }

        /* Goal Cards */
        .goal-card {
            background: rgba(24, 198, 163, 0.1);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 15px;
            border-right: 4px solid var(--success);
        }

        .goal-card h4 { color: var(--success); margin-bottom: 10px; }
        .goal-card ul { line-height:1.9; padding-inline-start:22px;  padding-right: 20px; color: #e2e8f0; }
        .goal-card li { margin-bottom: 8px; line-height: 1.7; }

        /* Student Cards */
        .student-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .student-card {
            background: rgba(255,255,255,0.05);
            border-radius: 15px;
            padding: 20px;
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.3s;
        }

        .student-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary);
            box-shadow: 0 10px 30px rgba(15, 104, 201, 0.2);
        }

        .student-card-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
        }

        .student-avatar {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, var(--primary), var(--success));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5em;
        }

        .student-info h4 { margin-bottom: 5px; }
        .student-info p { color: var(--gray); font-size: 0.9em; }

        .student-stats {
            display: flex;
            gap: 15px;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .student-stat { flex: 1; text-align: center; }
        .student-stat .value { font-size: 1.3em; font-weight: bold; }
        .student-stat .label { font-size: 0.8em; color: var(--gray); }

        .student-actions { display: flex; gap: 10px; margin-top: 15px; }
        .student-actions .btn { flex: 1; justify-content: center; }

        /* Search */
        .search-box { display: flex; gap: 15px; margin-bottom: 25px; }
        .search-box input {
            flex: 1;
            padding: 15px 20px;
            background: rgba(255,255,255,0.08);
            border: 2px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            color: #fff;
            font-size: 1em;
        }
        .search-box input:focus { border-color: var(--primary); outline: none; }

        /* Backup Controls */
        .backup-controls {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .backup-controls input[type="file"] {
            display: none;
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--gray);
        }

        .empty-state .icon { font-size: 5em; margin-bottom: 20px; opacity: 0.5; }
        .empty-state h3 { margin-bottom: 10px; color: #fff; }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.active { display: flex; }

        .modal-content {
            background: var(--dark);
            border-radius: 20px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            border: 1px solid rgba(255,255,255,0.1);
            max-height: 80vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--gray);
            font-size: 1.5em;
            cursor: pointer;
        }

        /* Answer Options */
        .answer-options { display: flex; gap: 10px; margin-top: 10px; }
        .answer-btn {
            flex: 1;
            padding: 10px;
            border: 2px solid rgba(255,255,255,0.2);
            background: transparent;
            border-radius: 8px;
            color: #fff;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1.2em;
        }

        .answer-btn:hover { background: rgba(255,255,255,0.1); }
        .answer-btn.selected-correct { border-color: var(--success); background: rgba(24, 198, 163, 0.2); }
        .answer-btn.selected-wrong { border-color: var(--danger); background: rgba(11, 127, 174, 0.2); }
        .answer-btn.selected-skip {
            border-color: var(--gray);
            background: rgba(148, 163, 184, 0.2);
        }

        /* All Wrong Button */
        .all-wrong-container {
            text-align: center;
            margin: 20px 0;
            padding: 15px;
            background: rgba(11, 127, 174, 0.05);
            border-radius: 10px;
            border: 1px solid rgba(11, 127, 174, 0.2);
        }

        .all-wrong-btn {
            padding: 12px 25px;
            background: transparent;
            border: 2px solid var(--danger);
            border-radius: 10px;
            color: var(--danger);
            cursor: pointer;
            transition: all 0.3s;
            font-size: 1em;
            font-weight: 600;
        }

        .all-wrong-btn:hover {
            background: rgba(11, 127, 174, 0.1);
            transform: translateY(-2px);
        }

        .all-wrong-btn.selected {
            background: var(--danger);
            color: #fff;
            box-shadow: 0 5px 15px rgba(11, 127, 174, 0.3);
        }

        /* IEP Styles */
        .iep-container {
            background: rgba(255,255,255,0.03);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 20px;
        }

        .iep-main-goal {
            background: linear-gradient(135deg, rgba(15, 104, 201, 0.2), rgba(24, 198, 163, 0.2));
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 25px;
            border-right: 5px solid var(--primary);
        }

        .iep-main-goal h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.1em; }
        .iep-main-goal p { font-size: 1.2em; line-height: 1.8; }

        .iep-short-goal {
            background: rgba(24, 198, 163, 0.1);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
            border-right: 4px solid var(--success);
        }

        .iep-short-goal h4 {
            color: var(--success);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .iep-objective {
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 12px;
        }

        .iep-objective-header {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 10px;
        }

.iep-objective-text { flex: 1; line-height: 1.7; }
.iep-objective-text.edited { color: var(--info); font-style: italic; }

        .areej-iep-schedule-panel {
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(32, 164, 216, 0.35);
            border-radius: 14px;
            padding: 18px;
            margin-bottom: 18px;
        }

        .areej-iep-schedule-header {
            display: flex;
            justify-content: space-between;
            gap: 14px;
            align-items: flex-start;
            margin-bottom: 15px;
        }

        .areej-iep-schedule-header h3 {
            margin: 0 0 6px;
            color: var(--light);
            font-size: 1.05em;
        }

        .areej-iep-schedule-header p {
            margin: 0;
            color: var(--gray);
            line-height: 1.7;
        }

        .areej-iep-schedule-grid {
            display: grid;
            grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.7fr);
            gap: 12px;
        }

        .areej-iep-schedule-grid label span {
            display: block;
            color: var(--gray);
            margin-bottom: 6px;
            font-size: 0.9em;
        }

        .areej-iep-schedule-grid input[type="date"],
        .areej-iep-schedule-grid input[type="number"] {
            width: 100%;
            padding: 11px 12px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.18);
            background: rgba(255,255,255,0.9);
            color: #0f172a;
            font: inherit;
        }

        .areej-iep-weekdays {
            grid-column: 1 / -1;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .areej-iep-weekday {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 9px 12px;
            border-radius: 999px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.14);
            cursor: pointer;
        }

        .areej-iep-weekday input {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
        }

        .areej-iep-weekday span {
            margin: 0;
            color: var(--light);
            white-space: nowrap;
        }

        .areej-iep-schedule-summary,
        .areej-goal-dates {
            background: rgba(32, 164, 216, 0.1);
            border: 1px solid rgba(32, 164, 216, 0.26);
            border-radius: 10px;
            color: var(--light);
        }

        .areej-iep-schedule-summary {
            padding: 12px 14px;
            margin-bottom: 18px;
            line-height: 1.8;
        }

        .areej-goal-dates {
            margin-top: 12px;
            padding: 11px 12px;
        }

        .areej-goal-dates-title {
            color: var(--info);
            font-weight: 700;
            margin-bottom: 8px;
        }

        .areej-goal-dates-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .areej-goal-dates-list span {
            display: inline-flex;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(255,255,255,0.1);
            line-height: 1.6;
        }

        @media (max-width: 640px) {
            .areej-iep-schedule-header {
                flex-direction: column;
            }

            .areej-iep-schedule-grid {
                grid-template-columns: 1fr;
            }
        }

        .areej-professional-reports {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 10px;
            margin-top: 24px;
            padding: 14px;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(32, 164, 216, 0.22);
            border-radius: 16px;
        }

        .areej-professional-reports .btn {
            min-height: 48px;
            white-space: normal;
            line-height: 1.5;
        }

        .areej-professional-reports .btn[data-report-action="print"] {
            grid-column: 1 / -1;
        }

        .edit-goal-btn {
            background: rgba(32, 164, 216, 0.2);
            border: none;
            color: var(--info);
            padding: 5px 10px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s;
        }

        .edit-goal-btn:hover { background: rgba(32, 164, 216, 0.4); }

        /* Evaluation */
        .evaluation-row {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .evaluation-section { flex: 1; min-width: 200px; }
        .evaluation-section h6 { color: var(--gray); font-size: 0.85em; margin-bottom: 8px; }

        .eval-options { display: flex; flex-wrap: wrap; gap: 5px; }
        .eval-option {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 10px;
            background: rgba(255,255,255,0.05);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.8em;
            border: 2px solid transparent;
        }

        .eval-option:hover { background: rgba(255,255,255,0.1); }
        .eval-option input[type="radio"] { display: none; }
        .eval-option.selected { border-color: var(--success); background: rgba(24, 198, 163, 0.2); }
        .eval-option.selected-warning { border-color: var(--warning); background: rgba(42, 169, 201, 0.2); }
        .eval-option.selected-danger { border-color: var(--danger); background: rgba(11, 127, 174, 0.2); }
        .eval-option.selected-primary { border-color: var(--primary); background: rgba(15, 104, 201, 0.2); }

        .custom-note-input {
            width: 100%;
            padding: 8px 12px;
            background: rgba(255,255,255,0.08);
            border: 2px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 0.85em;
            margin-top: 8px;
        }

        .custom-note-input:focus { border-color: var(--info); outline: none; }

        .eval-text-input {
            width: 100%;
            padding: 12px 15px;
            background: rgba(255,255,255,0.08);
            border: 2px solid rgba(255,255,255,0.15);
            border-radius: 10px;
            color: #fff;
            font-size: 0.95em;
            transition: all 0.3s;
        }

        .eval-text-input:focus {
            border-color: var(--primary);
            background: rgba(255,255,255,0.12);
            outline: none;
            box-shadow: 0 0 0 3px rgba(15, 104, 201, 0.2);
        }

        .eval-text-input::placeholder {
            color: rgba(255,255,255,0.4);
        }

        /* Plan Selection */
        .plan-question {
            background: rgba(42, 169, 201, 0.1);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 25px;
            border: 2px solid var(--warning);
            text-align: center;
        }

        .plan-question h4 { color: var(--warning); margin-bottom: 15px; }
        .plan-buttons { display: flex; gap: 15px; justify-content: center; margin-top: 15px; }

        .plan-list {
            display: none;
            background: rgba(255,255,255,0.05);
            border-radius: 15px;
            padding: 20px;
            margin-top: 20px;
        }

        .plan-list.active { display: block; }
        .plan-list h4 { margin-bottom: 15px; color: var(--primary); }

        .plan-option {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .plan-option:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); }
        .plan-option.selected { border-color: var(--success); background: rgba(24, 198, 163, 0.2); }
        .plan-option.disabled { opacity: 0.5; cursor: not-allowed; }

        .plan-option .plan-icon { font-size: 1.5em; }
        .plan-option .plan-name { font-weight: bold; }
        .plan-option .plan-desc { font-size: 0.85em; color: var(--gray); }

        .level-indicator {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 5px;
            font-size: 0.75em;
            margin-right: 10px;
        }

        .level-indicator.available { background: rgba(24, 198, 163, 0.2); color: var(--success); }
        .level-indicator.unavailable { background: rgba(11, 127, 174, 0.2); color: var(--danger); }

        /* Info Box */
        .info-box {
            background: rgba(32, 164, 216, 0.1);
            border: 1px solid var(--info);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 20px;
        }

        .info-box p { color: var(--info); font-size: 0.9em; }

        /* Welcome Screen */
        .welcome-screen { text-align: center; padding: 60px 20px; }
        .welcome-screen .icon { font-size: 5em; margin-bottom: 20px; }
        .welcome-screen h1 {
            font-size: 2.5em;
            margin-bottom: 15px;
            background: linear-gradient(135deg, var(--primary), var(--success));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .welcome-screen p { color: var(--gray); font-size: 1.2em; margin-bottom: 40px; }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 25px;
            margin: 40px 0;
        }

        .feature-card {
            background: rgba(255,255,255,0.05);
            border-radius: 20px;
            padding: 30px;
            text-align: center;
            transition: all 0.3s;
            cursor: pointer;
        }

        .feature-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.1); }

        .feature-card .icon { font-size: 3em; margin-bottom: 15px; }
        .feature-card h3 { margin-bottom: 10px; }
        .feature-card p { color: var(--gray); font-size: 0.9em; }

        /* Print Styles (deprecated - replaced by A4 block below) */
/* (تم تعطيل هذا البلوك بسبب خطأ أقواس) */

/* Responsive */
        @media (max-width: 1024px) {
            .sidebar { width: 100%; height: auto; position: relative; }
            .main-content { margin-right: 0; }
            .evaluation-row { flex-direction: column; }
        }

        /* ==================== طباعة A4 ==================== */
        @media print {
            * {
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            @page {
                size: A4 portrait;
                margin: 15mm;
            }
            body {
                background: white !important;
                margin: 0;
                padding: 0;
                font-size: 12pt;
            }
            .sidebar, .nav-item, .btn, .no-print, header, .tabs, .page-header button {
                display: none !important;
            }
            .main-content {
                margin: 0 !important;
                padding: 0 !important;
                width: 100% !important;
            }
            .page {
                display: none !important;
                background: white !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            .page.active {
                display: block !important;
            }
            /* تنسيق التقرير للطباعة */
            .report-container, .iep-container {
                width: 100% !important;
                max-width: 210mm !important;
                margin: 0 auto !important;
                padding: 0 !important;
                background: white !important;
                box-shadow: none !important;
            }
            .report-header {
                text-align: center;
                border-bottom: 3px solid #1a1a2e;
                padding-bottom: 15px;
                margin-bottom: 20px;
            }
            .report-logo {
                display: block;
                margin: 0 auto 10px;
                height: 70px;
                width: auto;
                object-fit: contain;
            }
            .goals-split th {
                background: #EAF9FB;
            }
            .goals-split td {
                vertical-align: top;
            }
            .report-header h1 {
                color: #1a1a2e !important;
                font-size: 18pt !important;
                margin-bottom: 5px;
            }
            .report-header h2 {
                color: #0F68C9 !important;
                font-size: 14pt !important;
                font-weight: normal;
            }
            .report-section {
                margin-bottom: 15px;
                page-break-inside: avoid;
            }
            .report-section-title {
                background: #0F68C9 !important;
                color: white !important;
                padding: 7px 14px !important;
                border-radius: 5px !important;
                font-size: 12pt !important;
                margin-bottom: 10px;
            }
            table {
                width: 100% !important;
                border-collapse: collapse !important;
                margin: 10px 0 !important;
                font-size: 10pt !important;
            }
            th, td {
                border: 1px solid #333 !important;
                padding: 8px !important;
                text-align: right !important;
            }
            th {
                background: #f0f0f0 !important;
                font-weight: bold !important;
            }
            .stats-grid {
                display: flex !important;
                justify-content: space-around !important;
                margin: 15px 0 !important;
            }
            .stat-box {
                text-align: center;
                padding: 10px 20px;
                border: 2px solid #ddd;
                border-radius: 8px;
            }
            .stat-box .value {
                font-size: 20pt !important;
                font-weight: bold;
            }
            .stat-box.success .value { color: #18C6A3 !important; }
            .stat-box.danger .value { color: #0B7FAE !important; }
            .stat-box.info .value { color: #0F68C9 !important; }
            .signatures {
                display: flex !important;
                justify-content: space-between !important;
                margin-top: 40px !important;
                padding-top: 20px !important;
                border-top: 2px solid #ddd !important;
            }
            .signature-box{
        border:1.5px solid #1f2a44;
        padding:12px;
        min-height:70px;
        text-align:center;
        font-size:14px;
    }
            .signature-box p {
                font-weight: bold;
                margin-bottom: 40px;
            }
            .signature-line {
                border-bottom: 1px solid #333;
                width: 100%;
            }
            /* منع قطع العناصر */
            .goal-item, .eval-item, .result-row {
                page-break-inside: avoid;
            }
            /* فاصل الصفحات */
            .page-break {
                page-break-before: always;
            }
        
            /* تحسين الطباعة: منع قص الجداول والعناوين */
            table { page-break-inside: auto !important; }
            tr { page-break-inside: avoid !important; page-break-after: auto !important; }
            thead { display: table-header-group !important; }
            tfoot { display: table-footer-group !important; }
            .report-section, .signatures, .signature-box{
        border:1.5px solid #1f2a44;
        padding:12px;
        min-height:70px;
        text-align:center;
        font-size:14px;
    }
            html, body { height: auto !important; }
        
        }

        /* تنسيق التقرير للعرض */
        .report-print-view {
            background: white;
            color: #333;
            padding: 30px;
            border-radius: 10px;
            max-width: 210mm;
            margin: 0 auto;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
        }

        .report-print-view h1 {
            color: #1a1a2e;
            text-align: center;
            font-size: 1.8em;
            margin-bottom: 5px;
        }

        .report-print-view h2 {
            color: #0F68C9;
            text-align: center;
            font-size: 1.2em;
            font-weight: normal;
            margin-bottom: 25px;
        }

        .report-print-view .section {
            margin-bottom: 20px;
        }

        .report-print-view .section-title{
        background:#f3f4f6;
        color:#1f2a44;
        padding:4px 10px; /* reduced height */
        border-top:2px solid #0F68C9;
        font-weight:bold;
        font-size:15px;
    }

        .report-print-view table {
            width: 100%;
            border-collapse: collapse;
            margin: 10px 0;
        }

        .report-print-view th,
        .report-print-view td {
            border: 1px solid #ddd;
            padding: 10px;
            text-align: right;
        }

        .report-print-view th {
            background: #f5f5f5;
        }

        /* ====== تحسين ألوان الجداول (قريبة من ألوان التقرير) ====== */
        .report-print-view table { margin-top: 12px; }
        .report-print-view th {
            background: #EAF9FB;
            color: #1f2a44;
            border: 1.5px solid #084C91;
        }
        .report-print-view td {
            border: 1px solid #BFE8F3;
        }
        .report-print-view tr:nth-child(even) td {
            background: #f8fafc;
        }
        .report-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-top: 8px;
            color: #374151;
            font-size: 0.82em;
        }

        .report-print-view .stats-row {
            display: flex;
            justify-content: space-around;
            margin: 20px 0;
            flex-wrap: wrap;
            gap: 15px;
        }

        .report-print-view .stat-item {
            text-align: center;
            padding: 15px 25px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            min-width: 100px;
        }

        .report-print-view .stat-item .num {
            font-size: 2em;
            font-weight: bold;
        }

        .report-print-view .stat-item .label {
            font-size: 0.9em;
            color: #666;
        }

        .report-print-view .stat-item.green { border-color: #18C6A3; }
        .report-print-view .stat-item.green .num { color: #18C6A3; }

        .report-print-view .stat-item.red { border-color: #0B7FAE; }
        .report-print-view .stat-item.red .num { color: #0B7FAE; }

        .report-print-view .stat-item.blue { border-color: #0F68C9; }
        .report-print-view .stat-item.blue .num { color: #0F68C9; }

        .report-print-view .stat-item.gray { border-color: #94a3b8; }
        .report-print-view .stat-item.gray .num { color: #94a3b8; }

        .report-print-view .goal-card {
            background: #f9fafb;
            border-radius: 8px;
            padding: 15px;
            margin: 10px 0;
            border-right: 4px solid #18C6A3;
        }

        .report-print-view .goal-card h4 {
            color: #18C6A3;
            margin: 0 0 10px 0;
        }

        .report-print-view .sigs {
            display: flex;
            justify-content: space-between;
            margin-top: 40px;
            padding-top: 20px;
            border-top: 2px solid #e5e7eb;
        }

        .report-print-view .sig {
            text-align: center;
            flex: 1;
        }

        .report-print-view .sig p {
            font-weight: bold;
            margin-bottom: 35px;
        }

        .report-print-view .sig-line {
            width: 80%;
            margin: 0 auto;
            border-bottom: 1px solid #333;
        }

        /* ==================== تصميم الجوال المحسن ==================== */
        
        /* زر القائمة للجوال */
        .mobile-menu-btn {
            display: none;
            position: fixed;
            top: 15px;
            right: 15px;
            z-index: 1001;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 12px;
            color: white;
            font-size: 1.5em;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(15, 104, 201, 0.4);
            transition: all 0.3s;
        }

        .mobile-menu-btn:active {
            transform: scale(0.95);
        }

        /* خلفية التعتيم */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 99;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .sidebar-overlay.active {
            display: block;
            opacity: 1;
        }

        /* تصميم الجوال */
        
.areej-ai-chat { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.areej-ai-message { border-radius: 16px; padding: 14px 16px; line-height: 1.9; white-space: pre-line; }
.areej-ai-message.assistant { background: #f4fbfb; border: 1px solid #d8eeee; border-right: 5px solid #1b8f8a; color: #263f44; }
.areej-ai-message.teacher { background: #f7fafc; border: 1px solid #e2e8f0; color: #334155; }
.areej-ai-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.areej-ai-option-btn { border: 1px solid #9cd4d6; background: #ffffff; color: #0f6c78; border-radius: 999px; padding: 9px 14px; font-family: inherit; font-weight: 700; cursor: pointer; transition: 0.2s ease; }
.areej-ai-option-btn:hover { background: linear-gradient(135deg, #e9faf7, #eef7ff); transform: translateY(-1px); }

@media (max-width: 768px) {
            /* إظهار زر القائمة */
            .mobile-menu-btn {
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* الشريط الجانبي */
            .sidebar {
                transform: translateX(100%);
                transition: transform 0.3s ease;
                width: 85%;
                max-width: 320px;
                box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
            }

            .sidebar.active {
                transform: translateX(0);
            }

            /* المحتوى الرئيسي */
            .main-content {
                margin-right: 0;
                padding: 80px 15px 20px 15px;
            }

            /* الإشعارات */
            .notification {
                right: 10px;
                left: 10px;
                max-width: calc(100% - 20px);
                top: 70px;
            }

            /* العناوين */
            .page-header h1 {
                font-size: 1.5em;
            }

            .welcome-screen h1 {
                font-size: 1.8em;
            }

            .welcome-screen .icon {
                font-size: 3em;
            }

            /* الشبكات */
            .stats-grid,
            .feature-grid,
            .student-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            /* الجداول */
            .data-table {
                font-size: 0.85em;
            }

            .data-table th,
            .data-table td {
                padding: 10px 8px;
            }

            /* النماذج */
            .form-grid {
                grid-template-columns: 1fr;
            }

            /* البطاقات */
            .card {
                padding: 15px;
            }

            .card-header {
                flex-direction: column;
                text-align: center;
            }

            .card-header .icon {
                margin-bottom: 10px;
            }

            /* عناصر الاختبار */
            .test-item-grid {
                grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
                gap: 8px;
            }

            .test-item {
                padding: 12px 8px;
                font-size: 1.1em;
            }

            /* أزرار الإجابة */
            .answer-options {
                flex-direction: column;
                gap: 5px;
            }

            .answer-btn {
                padding: 8px;
                font-size: 1em;
            }

            /* الأزرار */
            .btn {
                padding: 10px 20px;
                font-size: 0.95em;
            }

            .btn-sm {
                padding: 6px 12px;
                font-size: 0.85em;
            }

            /* أزرار التنقل في الاختبار */
            .test-item-grid + p + div[style*="display: flex"] {
                flex-direction: column;
                gap: 10px;
            }

            .test-item-grid + p + div button {
                width: 100%;
            }

            /* خيارات الخطة */
            .plan-option {
                flex-direction: column;
                text-align: center;
            }

            .plan-option .plan-icon {
                font-size: 2em;
                margin-bottom: 10px;
            }

            /* صف التقييم */
            .evaluation-row {
                flex-direction: column;
            }

            /* البحث */
            .search-box {
                flex-direction: column;
            }

            .search-box input,
            .search-box button {
                width: 100%;
            }

            /* أدوات النسخ الاحتياطي */
            .backup-controls {
                flex-direction: column;
            }

            .backup-controls button {
                width: 100%;
            }

            /* إحصائيات الطالب */
            .student-stats {
                flex-direction: column;
                gap: 10px;
            }

            /* إجراءات الطالب */
            .student-actions {
                flex-direction: column;
            }

            /* أزرار الخطة */
            .plan-buttons {
                flex-direction: column;
            }

            .plan-buttons button {
                width: 100%;
            }

            /* النوافذ المنبثقة */
            .modal-content {
                width: 95%;
                padding: 20px;
                max-height: 90vh;
            }

            /* التقرير */
            .report-print-view {
                padding: 15px;
            }

            .report-print-view h1 {
                font-size: 1.3em;
            }

            .report-print-view h2 {
                font-size: 1em;
            }

            .report-print-view table {
                font-size: 0.8em;
            }

            .report-print-view .stats-row {
                flex-direction: column;
                gap: 10px;
            }

            .report-print-view .stat-item {
                width: 100%;
            }

            .report-print-view .sigs {
                flex-direction: column;
                gap: 20px;
            }

            /* تحسين قراءة النصوص */
            .iep-objective-text {
                font-size: 0.95em;
                line-height: 1.8;
            }

            /* زر تعديل الهدف */
            .edit-goal-btn {
                font-size: 0.8em;
                padding: 4px 8px;
            }

            /* حقول الإدخال */
            .eval-text-input,
            .custom-note-input {
                font-size: 0.9em;
            }

            /* شريط التقدم */
            .progress-header {
                font-size: 0.9em;
            }

            /* أزرار القفز السريع */
            div[style*="display:flex"][style*="gap:8px"] {
                gap: 5px !important;
            }

            div[style*="display:flex"][style*="gap:8px"] .btn-sm {
                padding: 5px 8px;
                font-size: 0.75em;
            }
        }

        /* تصميم الشاشات الصغيرة جداً */
        @media (max-width: 768px) {

  /* زر القائمة للجوال + مراعاة Safe Area في iOS */
  .mobile-menu-btn{
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 12px;
  }

  /* المحتوى الرئيسي: لا ترفعينه 80px بشكل ثابت */
  .main-content{
    margin-right: 0;
    /* مساحة كافية للزر فقط: (12 + 50 + 12) = 74px */
    padding: calc(env(safe-area-inset-top, 0px) + 74px) 15px 20px 15px;
  }

  /* الإشعارات: خليها تحت الزر/الأعلى بشكل منطقي */
  .notification{
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

}


        /* تحسين اللمس للجوال */
        @media (hover: none) and (pointer: coarse) {
            .nav-item,
            .btn,
            .test-item,
            .answer-btn,
            .plan-option {
                min-height: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .test-item {
                min-height: 50px;
            }
        }
    
        /* teacher-note */
        .teacher-note {
            margin-top: 8px;
            padding: 10px 12px;
            border-radius: 10px;
            background: rgba(42, 169, 201, 0.10);
            color: var(--warning);
            font-size: 0.95em;
            line-height: 1.6;
        }

        @media print {
            .teacher-note { display: none !important; }
            #testNote, label[for="testNote"], .test-note-wrap { display: none !important; }
            .custom-note-input { display: none !important; }
        }


/* ====== Areej Logo placement (print + screen) ====== */
.areej-logo-wrap{
  position:absolute;
  top:14px;
  right:14px;
  z-index:2;
}
.areej-logo{
  width:70px;
  height:auto;
  display:block;
}

/* Ensure report header has room for logo */
.report-header, .reportHead, .report-head, .reportHeader{
  position:relative;
  min-height:90px;
}

/* رفع العنوان للأعلى */
.report-title, h2.report-title{
  margin-top: 12px !important;
}

/* إخفاء أي سطر/نص أزرق مخصص كعنوان فرعي */
.blue-subtitle, .report-subtitle, .subtitle-blue{
  display:none !important;
}


/* ===== تقييمات (قائمة اختيار) - تحسين التباين ===== */
select.eval-text-input{
  background:#ffffff !important;
  color:#111827 !important;
}
select.eval-text-input option{
  color:#111827 !important;
  background:#ffffff !important;
}
/* إذا كانت الخلفية داكنة ما زالت واضحة */
.eval-text-input{
  border-color: rgba(15, 104, 201, 0.35) !important;
}



        /* Language Switcher */
        .lang-switcher {
            position: fixed;
            top: 15px;
            left: 15px;
            z-index: 1002;
            display: flex;
            gap: 8px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            backdrop-filter: blur(14px);
            padding: 8px;
            border-radius: 14px;
            box-shadow: 0 6px 22px rgba(0,0,0,0.2);
        }
        .lang-switcher .lang-btn {
            border: none;
            cursor: pointer;
            padding: 8px 14px;
            border-radius: 10px;
            font-weight: 700;
            background: transparent;
            color: #fff;
            transition: all 0.25s ease;
        }
        .lang-switcher .lang-btn.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        }
        body.lang-en { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }
        @media (max-width: 768px) {
            .lang-switcher {
                top: calc(env(safe-area-inset-top, 0px) + 12px);
                left: 12px;
                padding: 6px;
            }
            .lang-switcher .lang-btn {
                padding: 7px 10px;
                font-size: 0.9em;
            }
        }


/* ===== Grade jump row fix v7.5 ===== */
.grade-jump-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
    padding: 8px 0;
    justify-content: flex-start;
}
html[dir="ltr"] .grade-jump-row {
    justify-content: flex-start;
}
.grade-jump-btn {
    min-width: 86px;
    justify-content: center;
    white-space: nowrap;
}
.grade-jump-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}
@media (max-width: 768px) {
    .grade-jump-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .grade-jump-btn {
        width: 100%;
        min-width: 0;
    }
}



/* ====== Areej brand refresh: logo + blue/green system ====== */
:root {
  --primary: #0F68C9;
  --primary-dark: #084C91;
  --primary-soft: #37A7FF;
  --success: #18C6A3;
  --success-dark: #0E8F7D;
  --warning: #2AA9C9;
  --danger: #0B7FAE;
  --dark: #073047;
  --darker: #041B2A;
  --gray: #A8C7D8;
  --info: #20A4D8;
  --surface: rgba(255,255,255,0.07);
  --surface-strong: rgba(255,255,255,0.11);
  --line: rgba(55,167,255,0.18);
  --brand-gradient: linear-gradient(135deg, #0F68C9 0%, #37A7FF 48%, #18C6A3 100%);
  --brand-gradient-dark: linear-gradient(135deg, #084C91 0%, #0F68C9 52%, #0E8F7D 100%);
}
body {
  background:
    radial-gradient(circle at 14% 10%, rgba(55,167,255,0.22), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(24,198,163,0.20), transparent 28%),
    linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%) !important;
}
.sidebar {
  background: linear-gradient(180deg, rgba(7,48,71,0.92), rgba(4,27,42,0.94)) !important;
  border-left: 1px solid var(--line) !important;
}
.sidebar-header {
  border-bottom: 1px solid var(--line) !important;
}
.sidebar-header h2,
.welcome-screen h1 {
  background: var(--brand-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
.card,
.student-card,
.stat-card,
.feature-card,
.iep-container,
.modal-content {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
}
.card-header .icon,
.student-avatar,
.nav-item.active,
.btn-primary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-info,
.mobile-menu-btn,
.lang-switcher .lang-btn.active,
.progress-fill {
  background: var(--brand-gradient) !important;
  color: #fff !important;
}
.btn:hover {
  box-shadow: 0 10px 30px rgba(15,104,201,0.28) !important;
}
.nav-item {
  color: var(--gray) !important;
}
.nav-item:hover {
  background: rgba(55,167,255,0.12) !important;
  color: #fff !important;
}
.nav-item.active {
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), 0 10px 24px rgba(15,104,201,0.20);
}
.nav-item .badge-count {
  background: var(--brand-gradient) !important;
}
.form-group input,
.form-group select,
.form-group textarea,
.search-box input,
.eval-text-input,
.custom-note-input {
  background: rgba(255,255,255,0.075) !important;
  border-color: rgba(55,167,255,0.22) !important;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-box input:focus,
.eval-text-input:focus,
.custom-note-input:focus {
  border-color: var(--primary-soft) !important;
  box-shadow: 0 0 0 3px rgba(55,167,255,0.18) !important;
}
.goal-card,
.iep-short-goal {
  background: rgba(24,198,163,0.10) !important;
  border-right-color: var(--success) !important;
}
.iep-main-goal {
  background: linear-gradient(135deg, rgba(15,104,201,0.18), rgba(24,198,163,0.18)) !important;
  border-right-color: var(--primary) !important;
}
.badge-success,
.badge-danger,
.badge-warning,
.badge-primary,
.badge-info,
.badge-neutral {
  background: rgba(55,167,255,0.14) !important;
  color: #BFEFFF !important;
  border: 1px solid rgba(55,167,255,0.20);
}
.notification-success,
.notification-error,
.notification-warning,
.notification-info {
  border-left-color: var(--primary-soft) !important;
}
.all-wrong-container,
.plan-question {
  background: rgba(32,164,216,0.08) !important;
  border-color: var(--info) !important;
}
.all-wrong-btn {
  border-color: var(--info) !important;
  color: var(--info) !important;
}
.all-wrong-btn.selected {
  background: var(--brand-gradient-dark) !important;
  color: #fff !important;
}
.report-print-view h1,
.report-header h1 {
  color: #073047 !important;
}
.report-print-view h2,
.report-header h2 {
  color: #0F68C9 !important;
}
.report-print-view .section-title,
.report-section-title {
  background: #EAF9FB !important;
  color: #073047 !important;
  border-top: 2px solid #18C6A3 !important;
}
.report-print-view th,
.goals-split th {
  background: #EAF9FB !important;
  color: #073047 !important;
  border-color: #37A7FF !important;
}
.report-print-view td {
  border-color: #BFE8F3 !important;
}
.areej-logo-wrap {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto 12px !important;
}
.report-header .areej-logo-wrap,
.reportHead .areej-logo-wrap,
.report-head .areej-logo-wrap,
.reportHeader .areej-logo-wrap {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  margin: 0 !important;
}
.areej-logo {
  width: 82px !important;
  height: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 18px rgba(15,104,201,0.18));
}
.sidebar-header .areej-logo { width: 96px !important; }
.welcome-screen .areej-logo { width: 118px !important; }
.icon,
.nav-item .icon,
.card-header .icon,
.feature-card .icon,
.empty-state .icon {
  color: #EAF9FB !important;
  text-shadow: none !important;
}
.nav-item .icon,
.feature-card .icon {
  background: linear-gradient(135deg, rgba(55,167,255,0.18), rgba(24,198,163,0.18));
  border: 1px solid rgba(55,167,255,0.20);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05em !important;
}
.feature-card .icon {
  width: 56px;
  height: 56px;
  margin-inline: auto;
  margin-bottom: 15px;
}
@media print {
  .report-header { border-bottom-color: #0F68C9 !important; }
  .areej-logo { width: 70px !important; filter: none !important; }
}



/* ===== Areej Student File Step 1: profile structure ===== */
.student-file-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:18px;}
.student-file-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;}
.student-file-tab{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;border-radius:999px;padding:9px 14px;cursor:pointer;transition:.2s ease;font-weight:700;}
.student-file-tab:hover,.student-file-tab.active{background:linear-gradient(135deg,var(--primary),var(--success));border-color:transparent;}
.student-file-section{display:none;}.student-file-section.active{display:block;}
.choice-with-note{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1.3fr);gap:10px;}
.file-completion-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:10px 0 18px;}
.file-completion-item{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.045);border-radius:12px;padding:10px;color:#e5e7eb;font-size:.9em;}
.file-completion-item.done{border-color:rgba(16,185,129,.6);}.file-completion-item.missing{border-color:rgba(245,158,11,.6);}
@media(max-width:768px){.choice-with-note{grid-template-columns:1fr}.student-file-toolbar{align-items:stretch}.student-file-toolbar .btn{width:100%;justify-content:center}}



/* ===== Areej report header logo fix =====
/* تصغير شعار التقارير ومنع تغطيته على اسم المعلمة/الاخصائية */
.report-print-view .report-header,
.report-container .report-header,
.iep-container .report-header {
  position: relative !important;
  min-height: 92px !important;
  padding: 18px 92px 16px 24px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
.report-print-view .report-header .areej-logo-wrap,
.report-container .report-header .areej-logo-wrap,
.iep-container .report-header .areej-logo-wrap,
.report-header .areej-logo-wrap {
  position: absolute !important;
  top: 18px !important;
  right: 22px !important;
  width: 54px !important;
  height: 54px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1 !important;
}
.report-print-view .report-header .areej-logo,
.report-container .report-header .areej-logo,
.iep-container .report-header .areej-logo,
.report-header .areej-logo {
  width: 54px !important;
  max-width: 54px !important;
  height: auto !important;
  object-fit: contain !important;
  filter: none !important;
}
.report-print-view .report-header h1,
.report-container .report-header h1,
.iep-container .report-header h1 {
  margin: 0 0 10px !important;
  line-height: 1.35 !important;
}
.report-print-view .report-header .report-meta,
.report-container .report-header .report-meta,
.iep-container .report-header .report-meta {
  padding-right: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}
@media print {
  .report-print-view .report-header,
  .report-container .report-header,
  .iep-container .report-header {
    min-height: 84px !important;
    padding: 14px 76px 12px 18px !important;
  }
  .report-print-view .report-header .areej-logo-wrap,
  .report-container .report-header .areej-logo-wrap,
  .iep-container .report-header .areej-logo-wrap,
  .report-header .areej-logo-wrap {
    top: 14px !important;
    right: 18px !important;
    width: 46px !important;
    height: 46px !important;
  }
  .report-print-view .report-header .areej-logo,
  .report-container .report-header .areej-logo,
  .iep-container .report-header .areej-logo,
  .report-header .areej-logo {
    width: 46px !important;
    max-width: 46px !important;
  }
}



/* ===== Fix: hide standalone logo inside IEP screen only ===== */
#iepContent > .iep-screen-logo {
  display: none !important;
}



/* ===== Areej Stage 3: behavioral and academic notes ===== */
.behavior-helper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.behavior-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.behavior-checks label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #e2e8f0;
    line-height: 1.6;
}
.behavior-checks input { width: auto !important; margin-top: 5px; }
.behavior-generated-box {
    background: rgba(14,165,233,0.10);
    border: 1px solid rgba(14,165,233,0.45);
    border-radius: 14px;
    padding: 15px;
    line-height: 1.9;
    min-height: 90px;
    white-space: pre-wrap;
}
.behavior-note-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-right: 4px solid var(--info);
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 12px;
}
.behavior-note-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.behavior-note-text { color:#e2e8f0; line-height:1.9; }
.behavior-small-note { color: var(--gray); font-size: .88em; margin-top: 6px; line-height: 1.7; }



/* ===== مساعد أريج المهني لصعوبات التعلم ===== */
.areej-ai-alert {
    background: linear-gradient(135deg, #eefaf8, #f4fbff);
    border: 1px solid #cfece7;
    border-right: 5px solid #1b8f8a;
    border-radius: 14px;
    padding: 14px 16px;
    color: #24545a;
    line-height: 1.8;
    margin-bottom: 18px;
}
.areej-ai-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 18px 0;
}
.areej-ai-tool {
    border: 1px solid #d4e9ea;
    background: #ffffff;
    color: #24545a;
    border-radius: 14px;
    padding: 13px 12px;
    font-family: inherit;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s ease;
}
.areej-ai-tool.active,
.areej-ai-tool:hover {
    background: linear-gradient(135deg, #e9faf7, #eef7ff);
    color: #0f6c78;
    border-color: #9cd4d6;
    transform: translateY(-1px);
}
.areej-ai-card {
    background: #fff;
    border: 1px solid #dbecee;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0, 70, 80, 0.08);
}
.areej-ai-card h3 {
    margin-bottom: 12px;
    color: #0f6c78;
}
.areej-ai-context {
    background: #f6fbfb;
    border-radius: 16px;
    padding: 14px;
    margin: 14px 0;
}
.areej-ai-context h4 {
    margin-bottom: 10px;
    color: #24545a;
}
.areej-ai-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}
.areej-ai-context-item {
    background: #ffffff;
    border: 1px solid #e3f1f2;
    border-radius: 12px;
    padding: 10px;
    color: #365f64;
}
.areej-ai-label {
    display: block;
    margin: 14px 0 8px;
    font-weight: 700;
    color: #244c52;
}
.areej-ai-textarea {
    width: 100%;
    border: 1px solid #cfe2e5;
    border-radius: 16px;
    padding: 14px;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    min-height: 160px;
}
.areej-ai-textarea:focus {
    border-color: #1b8f8a;
    box-shadow: 0 0 0 3px rgba(27,143,138,0.10);
}
.areej-ai-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.areej-ai-response {
    margin-top: 18px;
    background: #fbfefe;
    border: 1px solid #d8eeee;
    border-right: 5px solid #1b8f8a;
    border-radius: 16px;
    padding: 18px;
    line-height: 1.9;
    color: #273f43;
    white-space: pre-line;
}
@media (max-width: 768px) {
    .areej-ai-tools { grid-template-columns: 1fr; }
    .areej-ai-card { padding: 14px; }
}



/* ===== مساعد أريج الذكي - تحليل حساس للكلمات v2 ===== */
.smart-hero{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg, rgba(14,165,233,.18), rgba(16,185,129,.16));
    border:1px solid rgba(125,211,252,.22);
    border-radius:26px;
    padding:26px;
    margin:0 0 18px;
    box-shadow:0 18px 40px rgba(0,70,80,.10);
}
.smart-hero::after{content:"";position:absolute;inset:auto -60px -90px auto;width:260px;height:260px;border-radius:999px;background:rgba(16,185,129,.12);filter:blur(4px);}
.smart-hero h2{font-size:1.6em;margin-bottom:8px;color:#0f6c78;}
.smart-hero p{color:#24545a;line-height:1.8;max-width:850px;}
.smart-hero-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px;}
.smart-hero-badges span{padding:7px 12px;border-radius:999px;background:#fff;border:1px solid #d4e9ea;font-size:.9em;color:#0f6c78;}
.smart-workspace{display:grid;grid-template-columns:minmax(320px,0.9fr) minmax(360px,1.1fr);gap:18px;align-items:start;margin:18px 0;}
.smart-panel{background:#fff;border:1px solid #dbecee;border-radius:24px;padding:22px;box-shadow:0 12px 30px rgba(0,70,80,.08);}
.smart-panel-title{display:flex;align-items:center;gap:12px;margin-bottom:14px;}
.smart-panel-title .smart-icon{width:44px;height:44px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--primary),var(--success));font-size:1.35em;color:#fff;}
.smart-panel-title h3{margin:0;font-size:1.15em;color:#0f6c78;}
.smart-panel-title p{margin:4px 0 0;color:#537178;font-size:.9em;line-height:1.6;}
.smart-assistant-input{min-height:190px;line-height:1.9;resize:vertical;background:#fbffff!important;border:1px solid #cfece7!important;border-radius:18px!important;color:#12343a!important;width:100%;padding:14px;font-family:inherit;}
.smart-assistant-input:focus{outline:none;box-shadow:0 0 0 4px rgba(14,165,233,.13)!important;border-color:#70c6d0!important;}
.smart-prompt-chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;}
.smart-prompt-chips button{border:1px solid #cfece7;background:#f6fbfb;color:#0f6c78;border-radius:999px;padding:8px 11px;cursor:pointer;font-family:inherit;}
.smart-prompt-chips button:hover{background:#e9faf7;}
.smart-assistant-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;}
.smart-placeholder{min-height:320px;border:1px dashed #cfece7;border-radius:22px;display:flex;align-items:center;justify-content:center;text-align:center;color:#537178;padding:24px;background:#f8fcfc;}
.smart-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:0;}
.smart-box{background:#f8fcfc;border:1px solid #dbecee;border-radius:20px;padding:17px;min-height:130px;color:#244c52;}
.smart-box.wide{grid-column:1/-1;}
.smart-box h4{margin-bottom:10px;color:#0f6c78;display:flex;align-items:center;gap:8px;}
.smart-box ul{padding-right:22px;line-height:1.9;margin:0;}
.smart-box li{margin-bottom:5px;}
.smart-report-box{background:#ffffff;color:#1f2937;border-radius:20px;padding:18px;line-height:2;border-right:6px solid var(--success);box-shadow:0 10px 25px rgba(0,0,0,.08);}
.smart-chip{display:inline-block;margin:3px;padding:6px 10px;border-radius:999px;background:#eef7ff;border:1px solid #cfe7ff;color:#0f6c78;font-size:.84em;}
.smart-chip.green{background:#e9faf7;border-color:#cfece7;color:#15756f;}
.smart-confidence{height:12px;background:#e7f1f2;border-radius:999px;overflow:hidden;margin:10px 0 0;}
.smart-confidence span{display:block;height:100%;background:linear-gradient(135deg,var(--info),var(--success));border-radius:999px;}
.smart-mini-meter{display:grid;grid-template-columns:58px 1fr;gap:10px;align-items:center;}
.smart-score{font-size:1.7em;font-weight:800;color:#0f6c78;}
@media (max-width:1024px){.smart-workspace{grid-template-columns:1fr}.smart-result-grid{grid-template-columns:1fr}}
@media print{.smart-workspace,.smart-assistant-actions,.smart-prompt-chips{display:none!important;}}


/* ===== extracted from legacy index.html ===== */


/* ==================== v7.4 Layout Fix ==================== */
.student-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)) !important;
  gap:24px !important;
  align-items:start !important;
}
.student-card{
  overflow:hidden !important;
  padding:24px !important;
}
.student-actions{
  display:grid !important;
  grid-template-columns:repeat(5, minmax(0, 1fr)) !important;
  gap:12px !important;
  align-items:stretch !important;
}
.student-actions .btn{
  width:100% !important;
  min-width:0 !important;
  flex:none !important;
  justify-content:center !important;
  text-align:center !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:anywhere !important;
  line-height:1.2 !important;
  padding:12px 8px !important;
  min-height:86px !important;
}
.student-actions .btn .icon,
.student-actions .btn span{ pointer-events:none; }
#testContainer .btn{
  white-space:normal !important;
  text-align:center !important;
  justify-content:center !important;
  line-height:1.25 !important;
}
#testContainer div[style*="justify-content"]{
  gap:16px !important;
  flex-wrap:wrap !important;
}
@media (max-width:1100px){
  .student-grid{grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)) !important;}
  .student-actions{grid-template-columns:repeat(3, minmax(0, 1fr)) !important;}
}
@media (max-width:640px){
  .student-grid{grid-template-columns:1fr !important;}
  .student-actions{grid-template-columns:repeat(2, minmax(0, 1fr)) !important;}
  .student-actions .btn{min-height:72px !important;}
  #testContainer div[style*="justify-content"]{flex-direction:column !important;}
  #testContainer div[style*="justify-content"] .btn{width:100% !important;}
}

/* ===== Grade jump row fix v7.5 ===== */
.grade-jump-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
    padding: 8px 0;
    justify-content: flex-start;
}
html[dir="ltr"] .grade-jump-row {
    justify-content: flex-start;
}
.grade-jump-btn {
    min-width: 86px;
    justify-content: center;
    white-space: nowrap;
}
.grade-jump-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}
@media (max-width: 768px) {
    .grade-jump-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .grade-jump-btn {
        width: 100%;
        min-width: 0;
    }
}


/* ===== Areej mobile app interface v8 ===== */
:root{
  --areej-mobile-purple:#7c3aed;
  --areej-mobile-purple-2:#8b5cf6;
  --areej-mobile-blue:#0ea5e9;
  --areej-mobile-green:#10b981;
  --areej-mobile-ink:#15223b;
  --areej-mobile-muted:#64748b;
  --areej-mobile-card:#ffffff;
}

.areej-mobile-file-hub{display:none;}
.mobile-only{display:none;}

@media (max-width:768px){
  html,body{width:100%;overflow-x:hidden;}
  body{
    background:
      radial-gradient(circle at 15% 0%, rgba(255,255,255,.22), transparent 24%),
      linear-gradient(145deg,#7c3aed 0%,#8b5cf6 42%,#22c1dc 100%) !important;
    color:var(--areej-mobile-ink) !important;
    min-height:100dvh;
  }

  /* إلغاء القائمة اليمنى بالكامل في نسخة الجوال */
  .sidebar,.sidebar-overlay,.mobile-menu-btn{display:none !important;}
  .main-content{
    margin:0 !important;
    padding: max(18px, env(safe-area-inset-top, 0px)) 14px 22px !important;
    min-height:100dvh;
  }
  .lang-switcher{
    top: max(12px, env(safe-area-inset-top, 0px)) !important;
    left:14px !important;
    padding:5px !important;
    border-radius:999px !important;
    background:rgba(255,255,255,.22) !important;
    box-shadow:none !important;
  }
  .lang-switcher .lang-btn{font-size:.78rem !important;padding:6px 9px !important;border-radius:999px !important;}

  /* شاشة البداية: تشبه تطبيق جوال داخل بطاقة بيضاء */
  #home.page.active{
    display:flex !important;
    align-items:center;
    justify-content:center;
    min-height:calc(100dvh - 34px);
  }
  .welcome-screen{
    width:100%;
    max-width:390px;
    margin:0 auto;
    padding:22px 16px 18px !important;
    border-radius:32px;
    background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
    box-shadow:0 24px 60px rgba(15,23,42,.28);
    border:1px solid rgba(255,255,255,.76);
    text-align:right !important;
    position:relative;
    overflow:hidden;
  }
  .welcome-screen::before{
    content:"";
    position:absolute;
    inset:-80px -80px auto auto;
    width:190px;
    height:190px;
    border-radius:50%;
    background:linear-gradient(135deg,rgba(124,58,237,.18),rgba(14,165,233,.08));
    pointer-events:none;
  }
  .welcome-screen .abc-report-logo-wrap{
    position:static !important;
    width:60px;
    height:60px;
    border-radius:20px;
    background:linear-gradient(135deg,rgba(124,58,237,.12),rgba(16,185,129,.12));
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 0 18px auto;
    box-shadow:0 10px 24px rgba(124,58,237,.16);
  }
  .welcome-screen .abc-report-logo{width:45px !important;max-height:45px;object-fit:contain;}
  .welcome-screen h1{
    font-size:1.55rem !important;
    line-height:1.35;
    margin:0 0 6px !important;
    color:var(--areej-mobile-ink) !important;
    background:none !important;
    -webkit-text-fill-color:initial !important;
  }
  .welcome-screen p{
    color:var(--areej-mobile-muted) !important;
    font-size:.92rem !important;
    margin:0 0 22px !important;
  }
  .welcome-screen .feature-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:13px !important;
    margin:0 !important;
  }
  .welcome-screen .feature-card{
    min-height:154px;
    padding:18px 10px 16px !important;
    border-radius:25px !important;
    background:#fff !important;
    border:1px solid #eef2ff !important;
    box-shadow:0 14px 30px rgba(30,41,59,.10) !important;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center !important;
    gap:8px;
  }
  .welcome-screen .feature-card:nth-child(n+4){display:none !important;}
  .welcome-screen > .btn{display:none !important;}
  .welcome-screen .feature-card .icon{
    width:52px;
    height:52px;
    border-radius:19px;
    margin:0 !important;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.55rem !important;
    background:linear-gradient(135deg,rgba(124,58,237,.13),rgba(14,165,233,.10));
  }
  .welcome-screen .feature-card h3{
    margin:0 !important;
    color:var(--areej-mobile-ink) !important;
    font-size:1rem;
    font-weight:800;
  }
  .welcome-screen .feature-card p{
    margin:0 !important;
    color:var(--areej-mobile-muted) !important;
    font-size:.78rem !important;
    line-height:1.5;
  }

  /* الصفحات الداخلية */
  .page.active:not(#home){
    max-width:430px;
    margin:0 auto;
  }
  .page-header{
    margin:0 0 14px !important;
    padding:16px 16px 14px !important;
    border-radius:24px;
    color:#fff;
    background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.08));
    border:1px solid rgba(255,255,255,.24);
    backdrop-filter:blur(14px);
  }
  .page-header h1{font-size:1.28rem !important;margin:0 0 5px !important;color:#fff !important;}
  .page-header p{font-size:.86rem !important;color:rgba(255,255,255,.78) !important;}
  .card,.student-card,.iep-container,.info-box,.plan-list,.plan-question,.report-print-view{
    border-radius:24px !important;
    background:rgba(255,255,255,.96) !important;
    color:var(--areej-mobile-ink) !important;
    border:1px solid rgba(255,255,255,.72) !important;
    box-shadow:0 16px 40px rgba(15,23,42,.16) !important;
    backdrop-filter:blur(12px);
  }
  .card{padding:16px !important;}
  .card-header{align-items:flex-start !important;text-align:right !important;border-bottom:1px solid #eef2ff !important;}
  .card-header h3,.student-info h4,.empty-state h3{color:var(--areej-mobile-ink) !important;}
  .card-header p,.student-info p,.form-group label,.empty-state,.info-box p{color:var(--areej-mobile-muted) !important;}
  .form-group input,.form-group select,.form-group textarea,.search-box input,.eval-text-input,.custom-note-input{
    background:#f8fafc !important;
    color:#0f172a !important;
    border:1px solid #e2e8f0 !important;
    border-radius:16px !important;
    min-height:46px;
  }
  .btn{
    border-radius:17px !important;
    min-height:46px;
    box-shadow:0 10px 20px rgba(15,23,42,.10);
  }
  .btn-primary{background:linear-gradient(135deg,var(--areej-mobile-purple),var(--areej-mobile-blue)) !important;}
  .btn-success{background:linear-gradient(135deg,var(--areej-mobile-green),#059669) !important;}
  .btn-info{background:linear-gradient(135deg,#0ea5e9,#2563eb) !important;}

  /* قائمة الطلاب في الجوال: فتح الملف هو المدخل الأساسي */
  .student-grid{display:grid !important;grid-template-columns:1fr !important;gap:13px !important;}
  .student-card{padding:16px !important;position:relative;overflow:hidden;}
  .student-card::before{
    content:"";
    position:absolute;
    top:0;right:0;left:0;height:5px;
    background:linear-gradient(90deg,var(--areej-mobile-purple),var(--areej-mobile-blue),var(--areej-mobile-green));
  }
  .student-card-header{align-items:center !important;}
  .student-avatar{
    width:54px !important;height:54px !important;border-radius:20px !important;
    background:linear-gradient(135deg,var(--areej-mobile-purple),var(--areej-mobile-blue)) !important;
  }
  .student-stats{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;}
  .student-stat{background:#f8fafc;border-radius:16px;padding:9px 5px;}
  .student-actions{display:grid !important;grid-template-columns:1fr !important;gap:8px !important;}
  .student-actions .btn:not(:first-child){display:none !important;}
  .student-actions .btn:first-child::after{content:" ملف الطالب";}

  /* شريط ملف الطالب: كل الخيارات من داخل الملف */
  .areej-mobile-file-hub{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:0 0 14px;
  }
  .areej-mobile-file-hub button{
    border:0;
    border-radius:22px;
    padding:14px 10px;
    min-height:72px;
    color:var(--areej-mobile-ink);
    background:#fff;
    box-shadow:0 13px 30px rgba(15,23,42,.13);
    font-weight:800;
    line-height:1.35;
    cursor:pointer;
  }
  .areej-mobile-file-hub button span{display:block;font-size:1.35rem;margin-bottom:4px;}
  .student-file-toolbar{background:rgba(255,255,255,.94);border-radius:24px;padding:12px;margin-bottom:12px;box-shadow:0 16px 40px rgba(15,23,42,.15);}
  .student-file-tabs{display:flex !important;overflow-x:auto;gap:8px;padding-bottom:4px;}
  .student-file-tab{white-space:nowrap;border-radius:999px !important;background:#f1f5f9 !important;color:var(--areej-mobile-ink) !important;border:0 !important;}
  .student-file-tab.active{background:linear-gradient(135deg,var(--areej-mobile-purple),var(--areej-mobile-blue)) !important;color:#fff !important;}
  .backup-controls,.search-box{gap:10px !important;}
}


/* ===== Mobile final home v9: no sidebar + assistant card ===== */
@media (max-width:768px){
  .sidebar,
  .sidebar.active,
  #sidebar,
  .sidebar-overlay,
  .sidebar-overlay.active,
  .mobile-menu-btn{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    transform:none !important;
  }
  .main-content{
    margin-right:0 !important;
    margin-left:0 !important;
    width:100% !important;
    padding: max(18px, env(safe-area-inset-top, 0px)) 14px 22px !important;
  }
  body.sidebar-open,
  body.menu-open{
    overflow:auto !important;
  }
  .welcome-screen .feature-grid.mobile-home-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:13px !important;
  }
  .welcome-screen .feature-grid.mobile-home-grid .feature-card{
    display:flex !important;
  }
  .welcome-screen .feature-grid.mobile-home-grid .assistant-home-card{
    grid-column:1 / -1;
    min-height:128px !important;
  }
  .welcome-screen .feature-grid.mobile-home-grid .feature-card:nth-child(n+4){
    display:none !important;
  }
}

/* ===== Home final layout: keep the polished card view on desktop too ===== */
body:has(#home.active){
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.22), transparent 24%),
    linear-gradient(135deg,#8b4cf6 0%,#22c1d6 100%) !important;
  min-height:100vh;
}
body:has(#home.active) .sidebar,
body:has(#home.active) .sidebar-overlay,
body:has(#home.active) .mobile-menu-btn{
  display:none !important;
  visibility:hidden !important;
}
body:has(#home.active) .main-content{
  margin:0 !important;
  min-height:100vh;
  padding:34px 18px !important;
  display:flex;
  align-items:center;
  justify-content:center;
}
body:has(#home.active) #home{
  width:100%;
}
body:has(#home.active) .welcome-screen{
  position:relative;
  width:min(100%, 520px);
  margin:0 auto;
  padding:28px 22px 24px !important;
  background:rgba(255,255,255,.96) !important;
  border-radius:38px !important;
  box-shadow:0 24px 55px rgba(8,35,62,.16);
  overflow:hidden;
}
body:has(#home.active) .welcome-screen::before{
  content:"";
  position:absolute;
  inset:-80px -80px auto auto;
  width:210px;
  height:210px;
  border-radius:50%;
  background:linear-gradient(135deg,rgba(124,58,237,.11),rgba(14,165,233,.08));
  pointer-events:none;
}
body:has(#home.active) .welcome-screen .abc-report-logo-wrap{
  position:static !important;
  width:96px;
  height:96px;
  margin:0 auto 18px !important;
  display:flex;
  align-items:center;
  justify-content:center;
}
body:has(#home.active) .welcome-screen .abc-report-logo{
  width:86px !important;
  max-height:86px;
  object-fit:contain;
}
body:has(#home.active) .welcome-screen h1{
  color:#0f172a !important;
  background:none !important;
  -webkit-text-fill-color:initial !important;
  font-size:1.85rem !important;
  line-height:1.35;
  margin:0 0 8px !important;
}
body:has(#home.active) .welcome-screen > p{
  color:#64748b !important;
  font-size:1rem !important;
  margin:0 0 28px !important;
}
body:has(#home.active) .welcome-screen .feature-grid.mobile-home-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:16px !important;
  margin:0 !important;
}
body:has(#home.active) .welcome-screen .feature-card{
  min-height:160px;
  padding:20px 12px 18px !important;
  border-radius:25px !important;
  background:#fff !important;
  border:1px solid #eef2f7 !important;
  color:#0f172a !important;
  box-shadow:0 15px 35px rgba(15,23,42,.08);
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
}
body:has(#home.active) .welcome-screen .feature-card:nth-child(n+4),
body:has(#home.active) .welcome-screen > .btn{
  display:none !important;
}
body:has(#home.active) .welcome-screen .assistant-home-card{
  grid-column:1 / -1;
  min-height:136px !important;
}
body:has(#home.active) .welcome-screen .feature-card .icon{
  width:56px;
  height:56px;
  border-radius:20px;
  margin:0 !important;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0F68C9 !important;
  background:linear-gradient(135deg,rgba(124,58,237,.13),rgba(14,165,233,.10));
  border:1px solid rgba(15,104,201,.15);
  font-size:1.35rem !important;
}
body:has(#home.active) .welcome-screen .feature-card h3{
  margin:0 !important;
  color:#0f172a !important;
  font-size:1.05rem !important;
  font-weight:800;
}
body:has(#home.active) .welcome-screen .feature-card p{
  margin:0 !important;
  color:#64748b !important;
  font-size:.86rem !important;
  line-height:1.5;
}

/* ===== Bottom quick navigation ===== */
body{
  padding-bottom:calc(82px + env(safe-area-inset-bottom, 0px));
}
#areejBottomNav{
  position:fixed;
  left:50%;
  bottom:calc(14px + env(safe-area-inset-bottom, 0px));
  transform:translateX(-50%);
  width:min(430px, calc(100% - 28px));
  min-height:64px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:8px;
  border-radius:24px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(219,228,239,.9);
  box-shadow:0 18px 46px rgba(15,23,42,.20);
  backdrop-filter:blur(16px);
  z-index:19000;
  direction:rtl;
}
#areejBottomNav button{
  min-width:0;
  min-height:48px;
  border:0;
  border-radius:17px;
  background:transparent;
  color:#64748b;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  font:inherit;
  font-size:.76rem;
  font-weight:800;
  cursor:pointer;
}
#areejBottomNav button.active{
  color:#fff;
  background:linear-gradient(135deg,#0F68C9,#18C6A3);
  box-shadow:0 10px 24px rgba(15,104,201,.25);
}
#areejBottomNav .areej-bottom-icon{
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
  line-height:1;
}
.areej-ai-option-btn.areej-ai-option-other{
  border-color:#0F68C9 !important;
  background:#eef7ff !important;
  color:#0f6c78 !important;
  font-weight:900;
}
@media (min-width:769px){
  .main-content{
    padding-bottom:110px !important;
  }
  body:has(#home.active) .main-content{
    padding-bottom:110px !important;
  }
}
@media print{
  #areejBottomNav{display:none !important;}
}
