/* أنماط نظام نتائج الجامعة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* صفحة تسجيل الدخول */
.login-page {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    min-height: 100vh;
    background: #667eea; /* Fallback for older browsers */
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -moz-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -ms-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -o-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    -moz-box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    -ms-box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    -o-box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.2em;
}

/* الرأس */
.main-header {
    background: #667eea;
    color: white;
    padding: 15px 0;
    -webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    -ms-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    -o-box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.header-logo-title {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
}

.header-logo-frame {
    width: 40px;
    height: 40px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    border-radius: 4px;
    padding: 2px;
    overflow: hidden;
    -webkit-flex-shrink: 0;
    -moz-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.header-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.main-header h1 {
    font-size: 1.5em;
    margin: 0;
}

.main-nav {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 20px;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    border-radius: 5px;
    -webkit-transition: background 0.3s;
    -moz-transition: background 0.3s;
    -ms-transition: background 0.3s;
    -o-transition: background 0.3s;
    transition: background 0.3s;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.2);
}

.user-info {
    padding: 8px 15px;
    background: rgba(255,255,255,0.2);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    border-radius: 5px;
}

/* الحاوية الرئيسية */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* النماذج */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    border-radius: 5px;
    font-size: 1em;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* الأزرار */
.btn {
    padding: 10px 20px;
    border: none;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -ms-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

/* التنبيهات */
.alert {
    padding: 15px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* لوحة التحكم */
.dashboard-stats {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 30px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -ms-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -o-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.dashboard-menu {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.menu-item {
    background: white;
    padding: 30px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -ms-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -o-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -ms-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    font-size: 1.1em;
    font-weight: bold;
}

.menu-item:hover {
    background: #667eea;
    color: white;
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    -moz-box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    -ms-box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    -o-box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

/* الجداول */
.table-container {
    background: white;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;
    overflow: hidden;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -ms-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -o-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

table th {
    background: #667eea;
    color: white;
    font-weight: bold;
}

table tr:hover {
    background: #f8f9fa;
}

/* التذييل */
.main-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* الصفحات */
.page-header {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
}

/* بطاقات */
.card {
    background: white;
    padding: 20px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -ms-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -o-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-header h3 {
    color: #667eea;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .header-content {
        -webkit-box-orient: vertical;
        -moz-box-orient: vertical;
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-logo-title {
        -webkit-box-orient: vertical;
        -moz-box-orient: vertical;
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-logo-frame {
        width: 35px;
        height: 35px;
    }
    
    .main-header h1 {
        font-size: 1.2em;
    }
    
    .main-nav {
        -webkit-box-orient: vertical;
        -moz-box-orient: vertical;
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
        width: 100%;
    }
    
    .dashboard-stats,
    .dashboard-menu {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

