* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Generated by script */
@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}


body {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Login Page */
.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 400px;
    margin: 100px auto;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

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

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.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;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.info {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Dashboard */
.dashboard {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.dashboard-header h1 {
    color: #333;
}

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

.user-info span {
    color: #666;
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.nav-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.nav-tab:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

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

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

table td .btn {
    margin: 2px;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}

table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

/* Forms */
.form-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

/* Cards */
.card {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.card-body {
    color: #666;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions a,
.actions button {
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

/* Table action buttons container */
table td:last-child {
    white-space: nowrap;
}

/* Responsive table actions */
@media (max-width: 768px) {
    .actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .actions a,
    .actions button {
        width: 100%;
    }
    
    table td:last-child {
        white-space: normal;
    }
}

/* Status badges */
.badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

/* File upload */
.file-upload {
    margin-top: 10px;
}

.file-upload input[type="file"] {
    padding: 5px;
}

.file-link {
    display: inline-block;
    margin-top: 10px;
    color: #667eea;
    text-decoration: none;
}

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

/* Grade input */
.grade-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Chart container */
.chart-container {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    direction: rtl;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    background: #667eea;
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: white;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .dashboard {
        padding: 15px;
        margin-top: 10px;
        border-radius: 5px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 15px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .user-info span {
        font-size: 14px;
    }
    
    .user-info .btn {
        width: 100%;
    }
    
    /* Navigation Tabs */
    .nav-tabs {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tab {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    /* Forms */
    .form-container {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .btn-primary,
    .btn-success,
    .btn-danger,
    .btn-secondary,
    .btn-info {
        width: 100%;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 10px 0;
    }
    
    table {
        min-width: 600px;
        font-size: 13px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    table th {
        font-size: 13px;
    }
    
    table td .btn {
        padding: 5px 8px;
        font-size: 11px;
        margin: 2px 0;
        display: block;
        width: 100%;
    }
    
    /* Action buttons in table cells */
    table td {
        position: relative;
    }
    
    table td:last-child {
        min-width: 120px;
    }
    
    /* Cards */
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-header {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .card-body p {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* Login Box */
    .login-box {
        padding: 25px;
        margin: 50px auto;
        max-width: 100%;
    }
    
    .login-box h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-width: 100%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-close {
        font-size: 24px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: 60vh;
    }
    
    /* Badges */
    .badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* File upload */
    .file-upload input[type="file"] {
        width: 100%;
    }
    
    /* Grade input */
    .grade-input {
        width: 100%;
    }
    
    /* Chart container */
    .chart-container {
        padding: 15px;
    }
    
    /* Success/Error messages */
    .success-message,
    .error-message {
        font-size: 13px;
        padding: 10px;
    }
    
    /* Actions in mobile */
    .actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .actions a,
    .actions button {
        width: 100%;
    }
    
    /* Better spacing for mobile */
    h2, h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 16px;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .dashboard {
        padding: 10px;
    }
    
    .dashboard-header h1 {
        font-size: 18px;
    }
    
    .nav-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    table {
        min-width: 500px;
        font-size: 11px;
    }
    
    table th,
    table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    table td .btn {
        padding: 4px 6px;
        font-size: 10px;
        margin: 1px 0;
    }
    
    table td:last-child {
        min-width: 100px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .form-container {
        padding: 10px;
    }
    
    .card {
        padding: 10px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    h3 {
        font-size: 14px;
    }
    
    /* Smaller text for very small screens */
    .info {
        font-size: 11px;
    }
}

