/* استایل‌های پایه پنل مدیریت */

:root {
    --admin-primary: #1976d2;
    --admin-secondary: #263238;
    --admin-success: #43a047;
    --admin-danger: #e53935;
    --admin-warning: #ffa000;
    --admin-info: #00acc1;
    --admin-light: #f5f7fa;
    --admin-dark: #222b3c;
    --admin-gray: #90a4ae;
    --admin-white: #fff;
    --admin-black: #000;
    --admin-border: #e0e0e0;
    --admin-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
    --admin-radius: 6px;
    --admin-font: 'Vazirmatn', Tahoma, Arial, sans-serif;
    --admin-transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

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

html {
    font-size: 15px;
    font-family: var(--admin-font);
    direction: rtl;
    background: var(--admin-light);
}

body {
    color: var(--admin-dark);
    background: var(--admin-light);
    min-height: 100vh;
    font-family: var(--admin-font);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
}

/* تنظیمات لایه اصلی */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* تنظیمات منوی کناری */
.admin-sidebar {
    width: 250px;
    background: var(--admin-secondary);
    color: var(--admin-white);
    min-height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: var(--admin-shadow);
    display: flex;
    flex-direction: column;
    transition: var(--admin-transition);
}

.admin-sidebar .sidebar-header {
    padding: 2rem 1.5rem 1rem 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--admin-primary);
    background: var(--admin-white);
    border-bottom: 1px solid var(--admin-border);
}

.admin-sidebar .sidebar-menu {
    flex: 1;
    padding: 1.5rem 0.5rem;
}

.admin-sidebar .sidebar-menu ul {
    list-style: none;
}

.admin-sidebar .sidebar-menu li {
    margin-bottom: 0.5rem;
}

.admin-sidebar .sidebar-menu a {
    display: flex;
    align-items: center;
    color: var(--admin-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--admin-radius);
    font-size: 1rem;
    transition: var(--admin-transition);
}

.admin-sidebar .sidebar-menu a.active,
.admin-sidebar .sidebar-menu a:hover {
    background: var(--admin-primary);
    color: var(--admin-white);
}

.admin-sidebar .sidebar-menu i {
    margin-left: 0.75rem;
    font-size: 1.1rem;
}

.admin-sidebar .sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-border);
    background: var(--admin-white);
    color: var(--admin-dark);
    text-align: center;
}

/* تنظیمات محتوای اصلی */
.admin-content {
    margin-right: 250px;
    padding: 2rem 2rem 2rem 1rem;
    flex: 1;
    background: var(--admin-light);
    min-height: 100vh;
    transition: margin 0.3s;
}

/* تنظیمات هدر */
.admin-header {
    background: var(--admin-primary);
    color: var(--admin-white);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--admin-shadow);
    z-index: 1001;
}

.admin-header .logo {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--admin-white);
}

.admin-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-header .user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--admin-white);
}

/* تنظیمات کارت‌ها */
.admin-card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

/* تنظیمات جدول‌ها */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--admin-white);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
    background: var(--admin-light);
    font-weight: 600;
    color: var(--admin-dark);
}

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

.admin-table tbody tr:hover {
    background: #f0f4fa;
}

/* تنظیمات فرم‌ها */
.admin-form-group {
    margin-bottom: 1.5rem;
}

.admin-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--admin-dark);
}

.admin-form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    font-size: 1rem;
    background: var(--admin-white);
    color: var(--admin-dark);
    transition: var(--admin-transition);
}

.admin-form-control:focus {
    border-color: var(--admin-primary);
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(25, 118, 210, 0.08);
}

.admin-form-control:disabled {
    background: var(--admin-light);
    color: var(--admin-gray);
}

/* تنظیمات دکمه‌ها */
.admin-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--admin-radius);
    cursor: pointer;
    transition: var(--admin-transition);
    margin-left: 0.5rem;
}

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

.admin-btn-primary:hover {
    background: #1565c0;
}

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

.admin-btn-success:hover {
    background: #388e3c;
}

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

.admin-btn-danger:hover {
    background: #b71c1c;
}

.admin-btn-warning {
    background: var(--admin-warning);
    color: var(--admin-dark);
}

.admin-btn-warning:hover {
    background: #ff8f00;
}

.admin-btn-light {
    background: var(--admin-light);
    color: var(--admin-dark);
    border: 1px solid var(--admin-border);
}

.admin-btn-light:hover {
    background: #eceff1;
}

/* تنظیمات هشدارها و پیام‌های مدیریت */
.admin-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--admin-radius);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.admin-alert-success {
    background: #e8f5e9;
    color: #388e3c;
    border-color: #c8e6c9;
}
.admin-alert-danger {
    background: #ffebee;
    color: #b71c1c;
    border-color: #ffcdd2;
}
.admin-alert-warning {
    background: #fffde7;
    color: #ff8f00;
    border-color: #ffe082;
}
.admin-alert-info {
    background: #e1f5fe;
    color: #0277bd;
    border-color: #b3e5fc;
}

/* بج‌ها */
.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 999px;
    background: var(--admin-gray);
    color: var(--admin-white);
    margin-right: 0.25rem;
}
.admin-badge-primary { background: var(--admin-primary); }
.admin-badge-success { background: var(--admin-success); }
.admin-badge-danger { background: var(--admin-danger); }
.admin-badge-warning { background: var(--admin-warning); color: var(--admin-dark); }
.admin-badge-info { background: var(--admin-info); }

/* ابزارهای کوچک */
.admin-divider {
    height: 1px;
    background: var(--admin-border);
    margin: 1.5rem 0;
    border: none;
}
.admin-shadow {
    box-shadow: var(--admin-shadow) !important;
}
.admin-rounded {
    border-radius: var(--admin-radius) !important;
}

/* تنظیمات واکنش‌گرا */
@media (max-width: 991.98px) {
    .admin-sidebar {
        width: 200px;
    }
    .admin-header {
        padding: 0.75rem 1rem;
    }
    .admin-content {
        margin-right: 200px;
        padding: 1.5rem 1rem 1.5rem 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .admin-sidebar {
        position: fixed;
        right: -220px;
        width: 200px;
        transition: right 0.3s;
    }
    .admin-sidebar.open {
        right: 0;
    }
    .admin-header {
        padding: 0.75rem 0.5rem;
    }
    .admin-content {
        margin-right: 0;
        padding: 1rem 0.5rem;
    }
}

/* تنظیمات انیمیشن‌ها */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* مودال */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--admin-transition);
}

.admin-modal.show {
    opacity: 1;
    visibility: visible;
}

.admin-modal-content {
    background: var(--admin-white);
    border-radius: var(--admin-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: var(--admin-transition);
}

.admin-modal.show .admin-modal-content {
    transform: translateY(0);
}

.admin-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--admin-dark);
    margin: 0;
}

.admin-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-gray);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--admin-transition);
}

.admin-modal-close:hover {
    color: var(--admin-danger);
}

.admin-modal-body {
    padding: 1.5rem;
}

.admin-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* تب‌ها */
.admin-tabs {
    margin-bottom: 2rem;
}

.admin-tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--admin-border);
    margin-bottom: 1.5rem;
}

.admin-tab-item {
    padding: 1rem 1.5rem;
    color: var(--admin-gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--admin-transition);
}

.admin-tab-item:hover {
    color: var(--admin-primary);
}

.admin-tab-item.active {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
}

.admin-tab-content {
    display: none;
}

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

/* نمودارها */
.admin-chart-container {
    background: var(--admin-white);
    border-radius: var(--admin-radius);
    padding: 1.5rem;
    box-shadow: var(--admin-shadow);
    margin-bottom: 2rem;
}

.admin-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.admin-chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--admin-dark);
    margin: 0;
}

.admin-chart-actions {
    display: flex;
    gap: 0.75rem;
}

.admin-chart-filter {
    padding: 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-white);
    color: var(--admin-dark);
    cursor: pointer;
    transition: var(--admin-transition);
}

.admin-chart-filter:hover {
    border-color: var(--admin-primary);
}

.admin-chart {
    position: relative;
    height: 300px;
}

/* آپلود فایل */
.admin-upload {
    border: 2px dashed var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--admin-transition);
}

.admin-upload:hover {
    border-color: var(--admin-primary);
}

.admin-upload-icon {
    font-size: 2rem;
    color: var(--admin-gray);
    margin-bottom: 1rem;
}

.admin-upload-text {
    color: var(--admin-gray);
    margin-bottom: 1rem;
}

.admin-upload-input {
    display: none;
}

.admin-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-upload-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--admin-radius);
    overflow: hidden;
}

.admin-upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-upload-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    color: var(--admin-white);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--admin-transition);
}

.admin-upload-remove:hover {
    background: var(--admin-danger);
}

/* پیش‌بارگذاری */
.admin-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.admin-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--admin-border);
    border-top-color: var(--admin-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* اسکرول‌بار سفارشی */
.admin-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--admin-gray) var(--admin-light);
}

.admin-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.admin-scrollbar::-webkit-scrollbar-track {
    background: var(--admin-light);
}

.admin-scrollbar::-webkit-scrollbar-thumb {
    background: var(--admin-gray);
    border-radius: 3px;
}

.admin-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--admin-primary);
} 