/* Course Evaluation System - Main Stylesheet */
/* RTL Support for Arabic */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f8f9fa;
}

/* Login/Register Pages */
.login-page, .register-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-form-container, .register-form-container {
    max-width: 400px;
    width: 100%;
}

.login-form-container .card, .register-form-container .card {
    border-radius: 15px;
}

/* Navigation Overrides for RTL */
.navbar-nav .nav-link {
    padding-left: 0.5rem;
    padding-right: 1rem;
}

.navbar-brand {
    margin-left: 1rem;
    margin-right: 0;
}

.dropdown-menu {
    right: 0;
    left: auto;
}

/* Card Styles */
.card {
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border: none;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Statistics Cards */
.border-right-primary {
    border-left: 0.25rem solid #4e73df !important;
    border-right: none !important;
}

.border-right-success {
    border-left: 0.25rem solid #1cc88a !important;
    border-right: none !important;
}

.border-right-info {
    border-left: 0.25rem solid #36b9cc !important;
    border-right: none !important;
}

.border-right-warning {
    border-left: 0.25rem solid #f6c23e !important;
    border-right: none !important;
}

/* Tables */
.table-responsive {
    border-radius: 0.35rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #5a5c69;
}

.table td {
    vertical-align: middle;
}

/* Buttons */
.btn {
    border-radius: 0.35rem;
    font-weight: 600;
}

.btn-sm {
    font-size: 0.75rem;
}

/* Forms */
.form-control {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
}

.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-group-text {
    border: 1px solid #d1d3e2;
    background-color: #eaecf4;
    color: #5a5c69;
}

/* Arabic text styling */
.arabic-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Evaluation Form Styles */
.evaluation-standard {
    background-color: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.evaluation-standard h6 {
    color: #5a5c69;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.standard-weight {
    font-size: 0.8rem;
    color: #858796;
}

/* Score badges */
.score-excellent {
    background-color: #1cc88a !important;
    color: white !important;
}

.score-good {
    background-color: #f6c23e !important;
    color: white !important;
}

.score-fair {
    background-color: #e74a3b !important;
    color: white !important;
}

/* Charts container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Breadcrumb RTL */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "←";
    color: #6c757d;
}

/* Filters panel */
.filters-panel {
    background-color: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Manual sections */
.manual-section {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.manual-section .card-header {
    cursor: pointer;
    user-select: none;
}

.manual-section .card-header:hover {
    background-color: #e2e6ea;
}

/* File upload area */
.upload-area {
    border: 2px dashed #d1d3e2;
    border-radius: 0.35rem;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fc;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #4e73df;
    background-color: #f0f3ff;
}

.upload-area.dragover {
    border-color: #1cc88a;
    background-color: #f0fff4;
}

/* Progress bars */
.progress {
    border-radius: 0.35rem;
    background-color: #eaecf4;
}

.progress-bar {
    border-radius: 0.35rem;
}

/* Alerts */
.alert {
    border-radius: 0.35rem;
    border: none;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1.25rem;
}

/* Pagination RTL */
.pagination {
    direction: ltr;
}

.page-link {
    border-radius: 0.35rem;
    margin: 0 0.125rem;
    border: 1px solid #dddfeb;
    color: #5a5c69;
}

.page-link:hover {
    background-color: #eaecf4;
    border-color: #dddfeb;
    color: #5a5c69;
}

.page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

/* Utility classes */
.text-xs {
    font-size: 0.7rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border-xl {
    width: 3rem;
    height: 3rem;
}

/* Modal RTL adjustments */
.modal-header .btn-close {
    margin: -0.5rem -0.5rem -0.5rem auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .login-form-container,
    .register-form-container {
        margin: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    .card-header .dropdown {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .card-header {
        background-color: #4a5568;
        border-color: #4a5568;
    }
    
    .table {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .table th,
    .table td {
        border-color: #4a5568;
    }
    
    .form-control {
        background-color: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        background-color: #4a5568;
        border-color: #667eea;
        color: #e2e8f0;
    }
}