@import url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', 'Poppins', sans-serif;
}

:root {
    --primary-color: #102cff;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --gray-color: #9ca3af;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    background-color: #f9fafb;
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* === LOGIN PAGE STYLES === */
.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #102cff 100%);
    overflow: hidden;
    position: relative;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.login-box {
    background-color: white;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    animation: boxFadeIn 0.6s ease;
}

@keyframes boxFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, #7209b7 0%, #102cff 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.login-logo i {
    font-size: 36px;
    color: white;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 600;
}

.login-header p {
    font-size: 16px;
    opacity: 0.9;
}

.login-form {
    padding: 40px 30px;
}

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

.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--gray-color);
    transition: var(--transition);
}

.form-group input {
    width: 100%;
    padding: 14px 15px 14px 15px;
    padding-right: 45px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background-color: #f9fafb;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input:focus + .input-icon {
    color: var(--primary-color);
}

.login-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.login-btn span {
    position: relative;
    z-index: 1;
    margin-left: 8px;
}

.login-btn i {
    position: relative;
    z-index: 1;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.login-btn:hover::before {
    width: 100%;
}

.login-btn:active {
    transform: translateY(1px);
}

.error-message {
    background-color: #fee2e2;
    color: var(--danger-color);
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-right: 4px solid var(--danger-color);
    font-size: 14px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.login-footer {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* === DASHBOARD LAYOUT === */
.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--dark-color) 0%, #111827 100%);
    color: white;
    position: fixed;
    height: 100%;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

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

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.sidebar-header h1 {
    font-size: 20px;
    margin-bottom: 5px;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 14px;
    opacity: 0.7;
}

.user-info {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.user-info p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.user-info p:last-child {
    margin-bottom: 0;
}

.user-info i {
    width: 20px;
    margin-left: 8px;
    text-align: center;
    opacity: 0.7;
}

.nav-menu {
    padding: 15px 0;
}

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    margin-left: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

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

.nav-item.active {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.3) 0%, transparent 100%);
    color: white;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
}

.main-content {
    margin-right: 280px;
    padding: 30px;
    width: calc(100% - 280px);
    transition: var(--transition);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    position: relative;
}

.header h2 {
    font-size: 22px;
    color: var(--dark-color);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.logout-btn {
    display: flex;
    align-items: center;
    background-color: #fee2e2;
    color: var(--danger-color);
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.logout-btn i {
    margin-left: 8px;
}

.logout-btn:hover {
    background-color: var(--danger-color);
    color: white;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.mobile-toggle:hover {
    background-color: #f3f4f6;
}

/* Cards and Data Display */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9fafb;
}

.card-title {
    font-size: 18px;
    color: var(--dark-color);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-left: 8px;
    opacity: 0.7;
}

.card-body {
    padding: 25px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

.table th, .table td {
    padding: 14px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: #f3f4f6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.btn i {
    margin-left: 6px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f9fafb;
}

.modal-title {
    font-size: 18px;
    color: var(--dark-color);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-title i {
    margin-left: 8px;
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background-color: #f3f4f6;
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f9fafb;
}

/* Delete Confirmation Modal */
.confirm-modal .modal-body {
    text-align: center;
    padding: 30px 25px;
}

.confirm-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #fee2e2;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.confirm-icon i {
    font-size: 30px;
    color: var(--danger-color);
}

.confirm-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.confirm-details {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 20px;
}

/* Form Styles */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
}

.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    background-color: #f9fafb;
}

.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.form-row .radio-group {
    display: flex;
    gap: 20px;
}

.form-row .radio-item {
    display: flex;
    align-items: center;
}

.form-row .radio-item input {
    width: auto;
    margin-left: 8px;
}

.form-row small {
    display: block;
    margin-top: 5px;
    color: var(--gray-color);
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    margin-left: 12px;
    font-size: 18px;
}

.alert-success {
    background-color: #ecfdf5;
    color: var(--success-color);
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fffbeb;
    color: var(--warning-color);
    border: 1px solid #fef3c7;
}

/* File Icons */
.file-icon {
    font-size: 18px;
    margin-left: 8px;
}

.file-pdf {
    color: #ef4444;
}

.file-doc {
    color: #3b82f6;
}

.file-excel {
    color: #10b981;
}

.file-image {
    color: #8b5cf6;
}

.file-archive {
    color: #f59e0b;
}

.file-code {
    color: #06b6d4;
}

.file-default {
    color: #6b7280;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.badge i {
    margin-left: 5px;
    font-size: 10px;
}

.badge-primary {
    background-color: #e0e7ff;
    color: var(--primary-color);
}

.badge-success {
    background-color: #d1fae5;
    color: var(--success-color);
}

.badge-danger {
    background-color: #fee2e2;
    color: var(--danger-color);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-right: 250px;
        width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
        padding: 20px;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header .btn {
        width: 100%;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .table {
        min-width: 650px;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 15px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .modal {
        max-width: 100%;
    }
    
    .form-row .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}