/* =============================================
   استایل پنل مدیریت
   مسیر: assets/css/admin.css
   ============================================= */

/* ===== هدر پنل ===== */
.admin-header {
    background: white;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-header-left h1 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.admin-header-left h1 i {
    color: #6366f1;
}

.admin-welcome {
    font-size: 14px;
    color: #64748b;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-view-site,
.admin-logout {
    padding: 6px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-view-site {
    background: #f1f5f9;
    color: #475569;
}

.admin-view-site:hover {
    background: #e2e8f0;
}

.admin-logout {
    background: #fef2f2;
    color: #dc2626;
}

.admin-logout:hover {
    background: #fee2e2;
}

/* ===== منوی کناری ===== */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 250px;
    background: white;
    border-left: 1px solid #e2e8f0;
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav ul li {
    margin: 0;
}

.admin-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.admin-nav ul li a:hover {
    background: #f8fafc;
    color: #0f172a;
}

.admin-nav ul li a.active {
    background: #eef2ff;
    color: #6366f1;
    border-right-color: #6366f1;
}

.admin-nav ul li a i {
    width: 20px;
    text-align: center;
}

/* ===== محتوای اصلی ===== */
.admin-content {
    flex: 1;
    padding: 24px;
    background: #f8fafc;
}

/* ===== آمار ===== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e2e8f0;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}
.stat-icon.green {
    background: #d1fae5;
    color: #059669;
}
.stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}
.stat-icon.orange {
    background: #fef3c7;
    color: #d97706;
}

.stat-info .stat-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.stat-info .stat-label {
    display: block;
    font-size: 13px;
    color: #64748b;
}

.stat-change {
    font-size: 12px;
    color: #10b981;
}

.stat-change.warning {
    color: #d97706;
}

/* ===== گرید کارت‌ها ===== */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.admin-card .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card .card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.admin-card .card-header h3 i {
    color: #6366f1;
    margin-left: 8px;
}

.card-link {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

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

/* ===== لیست‌ها ===== */
.admin-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.admin-list li:last-child {
    border-bottom: none;
}

.list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef2ff;
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.list-avatar.small {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.list-info {
    flex: 1;
}

.list-info .list-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.list-info .list-subtitle {
    display: block;
    font-size: 13px;
    color: #64748b;
}

.list-info .list-meta {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

.list-date {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.list-badge {
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.list-badge.approved {
    background: #d1fae5;
    color: #059669;
}

.list-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

/* ===== حالت خالی ===== */
.admin-empty {
    padding: 24px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ===== دسترسی سریع ===== */
.admin-quick-actions {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
}

.admin-quick-actions h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.admin-quick-actions h3 i {
    color: #6366f1;
    margin-left: 8px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    color: #6366f1;
}

.quick-btn i {
    font-size: 18px;
}

.quick-btn span {
    font-size: 13px;
    font-weight: 500;
}

.quick-btn.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.quick-btn.warning:hover {
    background: #fde68a;
}

/* =============================================
   ریسپانسیو
   ============================================= */
@media (max-width: 1200px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-header-right {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .admin-wrapper {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 10px 0;
    }
    
    .admin-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 0 12px;
    }
    
    .admin-nav ul li a {
        padding: 6px 12px;
        border-right: none;
        border-bottom: 2px solid transparent;
        font-size: 13px;
    }
    
    .admin-nav ul li a.active {
        border-bottom-color: #6366f1;
        border-right-color: transparent;
    }
    
    .admin-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-info .stat-number {
        font-size: 18px;
    }
    
    .admin-content {
        padding: 12px;
    }
    
    .quick-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header-left h1 {
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   استایل‌های فرم‌های مدیریت
   ============================================= */

/* ===== فرم‌ها ===== */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-form .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form .form-group label i {
    color: #6366f1;
    font-size: 14px;
    width: 18px;
}

.admin-form .form-group .required {
    color: #dc2626;
    font-weight: 700;
}

.admin-form .form-control {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.2s;
    background: white;
    width: 100%;
}

.admin-form .form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-form .form-control::placeholder {
    color: #94a3b8;
}

.admin-form .form-control:hover {
    border-color: #cbd5e1;
}

.admin-form .form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-form .form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.admin-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.8;
}

/* ===== چک‌باکس‌ها ===== */
.admin-form .checkbox-label-inline {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.admin-form .checkbox-label-inline span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form .checkbox-group-inline {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.admin-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    padding: 4px 0;
}

.admin-form .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-form .checkbox-label:hover {
    color: #0f172a;
}

/* ===== دکمه‌های فرم ===== */
.admin-form .form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.admin-submit {
    padding: 10px 28px;
    border-radius: 10px;
    border: none;
    background: #6366f1;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-submit:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.admin-submit i {
    font-size: 16px;
}

.admin-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* ===== جدول‌ها ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px;
}

.admin-table th {
    text-align: right;
    padding: 12px 16px;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

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

/* ===== ریسپانسیو ===== */
@media (max-width: 992px) {
    .admin-form .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .admin-form .form-control {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .admin-form .checkbox-group-inline {
        flex-direction: column;
        gap: 8px;
    }
    
    .admin-form .form-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-submit {
        width: 100%;
        justify-content: center;
    }
    
    .admin-cancel {
        width: 100%;
        justify-content: center;
    }
}
/* =============================================
   استایل‌های بهبودیافته فرم‌های مدیریت
   ============================================= */

/* ===== کارت‌های فرم ===== */
.admin-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    overflow: hidden;
}

.admin-card .card-header {
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card .card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-card .card-header h3 i {
    color: #6366f1;
}

.admin-card .card-body {
    padding: 24px;
}

/* ===== فرم‌ها ===== */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-form .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form .form-group label i {
    color: #6366f1;
    font-size: 14px;
    width: 18px;
}

.admin-form .form-group .required {
    color: #dc2626;
    font-weight: 700;
}

.admin-form .form-control {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.2s;
    background: #ffffff;
    width: 100%;
}

.admin-form .form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-form .form-control::placeholder {
    color: #94a3b8;
}

.admin-form .form-control:hover {
    border-color: #94a3b8;
}

.admin-form .form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-form .form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.admin-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.8;
}

/* ===== چک‌باکس‌ها ===== */
.admin-form .checkbox-label-inline {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.admin-form .checkbox-label-inline span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form .checkbox-group-inline {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.admin-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    padding: 4px 0;
}

.admin-form .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-form .checkbox-label:hover {
    color: #0f172a;
}

/* ===== دکمه‌ها ===== */
.admin-form .form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.admin-submit {
    padding: 10px 28px;
    border-radius: 8px;
    border: none;
    background: #6366f1;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-submit:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.admin-submit i {
    font-size: 16px;
}

.admin-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* ===== جدول‌ها ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px;
}

.admin-table th {
    text-align: right;
    padding: 12px 16px;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

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

/* ===== وضعیت‌ها ===== */
.status-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: #d1fae5;
    color: #059669;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.free {
    background: #d1fae5;
    color: #059669;
}

.status-badge.premium {
    background: #fef3c7;
    color: #d97706;
}

/* ===== عملیات ===== */
.admin-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn i {
    font-size: 14px;
}

.action-btn.edit {
    background: #dbeafe;
    color: #2563eb;
}

.action-btn.edit:hover {
    background: #bfdbfe;
}

.action-btn.view {
    background: #d1fae5;
    color: #059669;
}

.action-btn.view:hover {
    background: #a7f3d0;
}

.action-btn.delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #fca5a5;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 992px) {
    .admin-form .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .admin-card .card-body {
        padding: 16px;
    }
    
    .admin-form .form-control {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .admin-form .checkbox-group-inline {
        flex-direction: column;
        gap: 6px;
    }
    
    .admin-form .form-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-submit {
        width: 100%;
        justify-content: center;
    }
    
    .admin-cancel {
        width: 100%;
        justify-content: center;
    }
}