/* استایل عمومی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* صفحه ورود */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 450px;
    width: 100%;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

/* فرم‌ها */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Tahoma', 'Arial', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* دکمه‌ها */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    font-family: 'Tahoma', 'Arial', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* پیام‌ها */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #2d5;
    border: 1px solid #cfc;
}

.alert-info {
    background: #e7f3ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

/* داشبورد */
.dashboard-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.welcome-text {
    color: #666;
    font-size: 16px;
}

.dashboard-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card-title {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* جدول فیش‌ها */
.payslips-list {
    list-style: none;
}

.payslip-item {
    background: #f8f9fa;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.payslip-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.payslip-link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    flex: 1;
}

.payslip-date {
    color: #666;
    font-size: 14px;
}

/* نمایش فیش */
.payslip-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto 30px;
}

.payslip-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 3px solid #667eea;
    margin-bottom: 30px;
}

.payslip-header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
}

.employee-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    gap: 10px;
}

.info-label {
    font-weight: bold;
    color: #555;
}

.info-value {
    color: #333;
}

/* جدول فیش */
.payslip-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.payslip-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
}

.payslip-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.payslip-table tbody tr:nth-child(odd) {
    background: #f9f9f9;
}

.payslip-table tbody tr:hover {
    background: #f0f0f0;
}

.item-title {
    font-weight: bold;
    color: #555;
}

.amount {
    text-align: left;
    font-family: 'Tahoma', 'Arial', monospace;
    direction: ltr;
}

.payslip-table tfoot tr {
    background: #f0f0f0;
    font-weight: bold;
}

.payslip-table tfoot td {
    padding: 15px;
}

.net-pay-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.net-pay-row td {
    font-size: 18px;
    border-color: #667eea !important;
}

/* اطلاعات کارکرد */
.work-info {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.work-info h3 {
    color: #333;
    margin-bottom: 15px;
}

.work-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* دکمه‌های عملیات */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* فرم آپلود */
.upload-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.file-input-group {
    margin-bottom: 20px;
}

.file-input-label {
    display: block;
    padding: 50px 20px;
    border: 3px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.file-input-label:hover {
    border-color: #667eea;
    background: #f0f5ff;
}

.file-input-label.has-file {
    border-color: #28a745;
    background: #f0fff4;
}

input[type="file"] {
    display: none;
}

.file-name {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .employee-info,
    .work-details {
        grid-template-columns: 1fr;
    }
    
    .payslip-container {
        padding: 20px;
    }
    
    .dashboard-header {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state-subtext {
    font-size: 14px;
    color: #999;
}

/* توضیحات راهنما */
.help-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.help-box h4 {
    color: #856404;
    margin-bottom: 10px;
}

.help-box ul {
    margin-right: 20px;
    color: #856404;
}

.help-box li {
    margin-bottom: 5px;
}
